Open
Description
According to scala spec we have two following syntax endpoints that start with val
keyword:
Dcl ::= `val' ValDcl | ...
ValDcl ::= ids `:' Type
PatVarDef ::= `val' PatDef | ...
PatDef ::= Pattern2 {`,' Pattern2} [`:' Type] `=' Expr
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.