0008e832d8
Use KotlinLexer to determine the correct offset of an infix operator
token instead of skipping whitespaces after the operator's LHS.
This fixes cases like this:
```
assert("Name"/*in*/in/*in*/listOf("Hello", "World"))
| |
| [Hello, World]
false
```
38 lines
895 B
Plaintext
Vendored
38 lines
895 B
Plaintext
Vendored
Assertion failed
|
|
assert("Hello" !in listOf("Hello", "World"))
|
|
| |
|
|
| [Hello, World]
|
|
false
|
|
|
|
Assertion failed
|
|
assert(" !in " !in listOf(" !in "))
|
|
| |
|
|
| [ !in ]
|
|
false
|
|
|
|
Assertion failed
|
|
assert(
|
|
" !in "
|
|
|
|
!in
|
|
|
|
|
false
|
|
|
|
listOf(" !in ")
|
|
|
|
|
[ !in ]
|
|
)
|
|
|
|
Assertion failed
|
|
assert("Hello"/*!in*/!in/*!in*/listOf("Hello", "World"))
|
|
| |
|
|
| [Hello, World]
|
|
false
|
|
|
|
Assertion failed
|
|
assert(("Hello" !in listOf("Hello", "World")) !in listOf(false))
|
|
| | | |
|
|
| | | [false]
|
|
| | false
|
|
| [Hello, World]
|
|
false |