-
-
Notifications
You must be signed in to change notification settings - Fork 1.6k
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
Cannot pass hash directly to a method without parentheses #7923
Comments
I guess that's because parentheses are also used for blocks. |
Yes, this a limitation in the grammar. |
To expand on why this is unsolvable, otherwise the compiler will need to special-case this with 3-level deep lookahead. Which is usually seen as a very bad thing (sorry for not expanding on that one).
|
Syntax error in eval:3: unexpected token: =>
Assigning the hash to a variable first or adding parentheses to the method invocation works.
The text was updated successfully, but these errors were encountered: