-
Notifications
You must be signed in to change notification settings - Fork 815
Wrong let expression parsing #7741
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
Comments
Wait, doesn't (I admit I'm not sure of this, I use the |
@abelbraaksma It does, and its scope should be |
I'd expect it to be parsed as: do
(let x = 1 in (x + 1));
x And the latter |
This is a long-standing issue and I think there are various duplicates of it. I suspect the right approach here is to start raising warnings when this formulation is used |
@dsyme How bad would be changing the parsing rules here? |
The contents of
do
in the following code should be parsed as a sequence of let expression and x, but it's parsed as let expression in sequence of the sum and x.In addition to the unexpected tree form it also creates a wrong scope for
x
.AST viewer
The text was updated successfully, but these errors were encountered: