val (name: T) = rhs
is mistakenly parsed the same as val name: T = rhs
#8211
Labels
fixed in Scala 3
This issue does not exist in the Scala 3 compiler (https://github.com/lampepfl/dotty/)
parser
Milestone
According to scala spec we have two following syntax endpoints that start with
val
keyword:From here it's easy to see that val followed by a parenthesis can only mean a pattern which implies runtime type check rather than current compile-time one.
The text was updated successfully, but these errors were encountered: