twitter / rsc

Experimental Scala compiler focused on compilation speed
Apache License 2.0
1.24k stars 54 forks source link

Fix parenthesization of ascribed function types with single tuple arg #486

Closed wiwa closed 5 years ago

wiwa commented 5 years ago

val foo = (t: (A, B)) => () should be ascribed foo: ((A, B)) => Unit instead of foo: (A, B) => Unit, i.e. extra parentheses are necessary when dealing with functions of a single tuple argument.