-
Notifications
You must be signed in to change notification settings - Fork 1.1k
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
Update locations during destructive substitutions #1737
Conversation
PS: a bootstrap was apparently necessary (which surprised me a little) otherwise this would happen:
|
951b069
to
9e107ee
Compare
I reviewed. The code looks fine and is pretty low risk (it only change location on things where locations used to be, well, mostly crap). Also, it works for both non-destructive and destructive substitutions. The tests, however, could be improved:
|
Yes, that's because when printing error messages some locations aren't printed if they come from the toplevel. I rewrote the test to switch from using
Fair point, done. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The ocamltest script doesn't look very nice, but the tests are great! Looks good to me.
This PR proposes to update locations when performing a destructive substitution, this is to avoid error messages like this one:
After this PR, it becomes: