Skip to content

Add reproduction for some locate issues #1930

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 6 commits into
base: main
Choose a base branch
from

Conversation

voodoos
Copy link
Collaborator

@voodoos voodoos commented May 2, 2025

The last commit should fix both #1580 and #1588.

@voodoos
Copy link
Collaborator Author

voodoos commented May 5, 2025

@ddickstein I added reproduction for the issues you listed when they were missing.
I also fixed the one linked to the typer recovery.

@@ -5408,7 +5408,7 @@ and type_label_exp create env loc ty_expected
if is_poly then check_univars env "field value" arg label.lbl_arg vars;
(lid, label, {arg with exp_type = instance arg.exp_type})

and type_argument ?explanation ?recarg env sarg ty_expected' ty_expected =
and type_argument_ ?explanation ?recarg env sarg ty_expected' ty_expected =
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

what is the difference between type_argument and type_argument_ ? could we find more meaningful names?
And it looks strange that we touch to something inside src/ocaml/typing? Is this related to type recovery?

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Oh ok! In fact type_argument_ is the OCaml one and type_argument is a wrapper dealing with Merlin specific stuff? Make sense.

Copy link
Collaborator Author

@voodoos voodoos May 7, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Exactly. The same pattern is used for type_expect (or something similar)

set_levels saved;
let loc = sarg.pexp_loc in
{
exp_desc = Texp_ident
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

WDYT about extracting the exp_desc in a dedicated variable?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants