-
-
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
Drop parentheses around ->
inside certain comma-separated lists
#14506
Drop parentheses around ->
inside certain comma-separated lists
#14506
Conversation
4b430dc
to
8b4ba6d
Compare
I have been thinking about this: if macro interpolation transforms That leaves unions but IIRC there were still some edge cases making |
Yeah I think that makes sense 👍 |
Well: lib Lib
fun foo(x : Int, Int) # Error: expecting token '->', not ')'
fun foo(x : Pointer(Void), Int) # Error: expecting token '->', not ')'
fun foo(x : ::Proc(::Nil), Int) # Error: expecting token '->', not ')'
end So |
This seems awefully complex, but I guess there's no other way to handle the ambiguity issues around |
Fixes #14216.
The formatter is not affected, since it will preserve any number of parentheses around a
ProcNotation
.