Closed
Description
Alright, given the following snippet, the .
will actually be marked as a number
.
val myList = List(1, 2, 3)
myList
.map(_ * 2) // <- . here is marked as a number
A corpus for this bug would look like this:
===============================
Chained expressions
===============================
def main() {
val myList = List(1, 2, 3)
myList.map(_ * 2)
myList
.map(_ * 2)
}
---
(compilation_unit
(function_definition
(identifier)
(parameters)
(block
(val_definition (identifier) (call_expression
(identifier)
(arguments (number) (number) (number))))
(call_expression
(field_expression (identifier) (identifier))
(arguments (infix_expression
(identifier) (operator_identifier) (number))))
(call_expression
(field_expression (identifier) (identifier))
(arguments (infix_expression
(identifier) (operator_identifier) (number)))))))
You can see what it actually does here:
I think this is actually a automatic semi insertion issue where we don't account that the .call
can be on a new line.
Metadata
Metadata
Assignees
Labels
No labels