Types of lambda parameters without parenthesis
susliko opened this issue · comments
Commit of tree-sitter-scala you tested this on
A code sample showing the error
xs.map { x: Int => x }
Show the error node
(compilation_unit [0, 0] - [1, 0]
(call_expression [0, 0] - [0, 22]
function: (field_expression [0, 0] - [0, 6]
value: (identifier [0, 0] - [0, 2])
field: (identifier [0, 3] - [0, 6]))
arguments: (block [0, 7] - [0, 22]
(ascription_expression [0, 9] - [0, 15]
(identifier [0, 9] - [0, 10])
(type_identifier [0, 12] - [0, 15]))
(ERROR [0, 16] - [0, 21]))))
What do you expect the tree to look like
It should be recognized as a lambda expression
Where are you experiencing this error?
This syntax was allowed in Scala 2. E.g. ClassFileWriters.scala