-
Notifications
You must be signed in to change notification settings - Fork 464
Fix superfluous parens for underscore application #7370
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
Conversation
}, _)) | ||
->(Js.Promise.then_(value => { | ||
}, _) | ||
->Js.Promise.then_(value => { | ||
Js.log(value) | ||
Js.Promise.resolve(value + 3) |
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.
This is the expected output, it removes the unnecessary parens.
@@ -36,7 +36,7 @@ f((a, b) => List.length(_), a, b) | |||
f(a, b, _)(x, y) | |||
-f(a, b, _) | |||
f(a, b, _) + g(x, _, z) | |||
f(a, b, _) + (g(x, _, z)) + h(alpha, beta, _) | |||
f(a, b, _) + g(x, _, z) + h(alpha, beta, _) |
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.
Same as previous.
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.
Nice! Thanks a lot!
Not in the scope of this PR, but wondering whether we couldn't have a better representation than that magic variable name __x
in our new AST?
* Fix superfluous parens for underscore application * Update CHANGELOG --------- Co-authored-by: Christoph Knittel <[email protected]>
Fix #7345