Skip to content
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

test: show bad location in empty interpolation error #888

Merged
merged 3 commits into from
Nov 14, 2023

Conversation

anmonteiro
Copy link
Member

No description provided.

@anmonteiro anmonteiro force-pushed the anmonteiro/show-empty-interpolation-location-bug branch from ca62a64 to f4f814f Compare November 13, 2023 23:54
anmonteiro added a commit that referenced this pull request Nov 14, 2023
@anmonteiro anmonteiro force-pushed the anmonteiro/show-empty-interpolation-location-bug branch from a0865fd to b55806d Compare November 14, 2023 01:01
@@ -172,15 +172,6 @@ let suites =
Invalid_syntax_of_var " (" ) ->
OUnit.assert_bool __LOC__ true
| _ -> OUnit.assert_bool __LOC__ false );
( __LOC__ >:: fun _ ->
Copy link
Member Author

Choose a reason for hiding this comment

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

this test was duplicated with the one I changed below.

@anmonteiro anmonteiro merged commit aaf5473 into main Nov 14, 2023
4 checks passed
@anmonteiro anmonteiro deleted the anmonteiro/show-empty-interpolation-location-bug branch November 14, 2023 01:14
$ melc -ppx melppx x.ml
File "x.ml", line 1, characters 20-23:
1 | let x = {j| Hello, $()|j}
^^^
Copy link
Member

Choose a reason for hiding this comment

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

Is this on the right location? Seems it's picking ()| rather than $().

Copy link
Member

Choose a reason for hiding this comment

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

Sorry, after reading the title, it's unclear to me if the PR was created to showcase this bad location or to fix it.

Copy link
Member Author

Choose a reason for hiding this comment

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

oh good point, I guess we could move it backwards yet one more char.

The first commit shows the wrong location, and the 2nd commit fixes it.

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.

None yet

2 participants