54c58671fb
Instead of searching for the operator in the string representation of
the whole expression, consider the operator's start to be the
first non-whitespace non-dot character _after_ the LHS of the infix
expression.
This fixes cases like this:
```
assert("Name in " in listOf("Hello", "World"))
| |
| [Hello, World]
false
```
^KT-66208 Fixed
38 lines
909 B
Plaintext
Vendored
38 lines
909 B
Plaintext
Vendored
Assertion failed
|
|
assert("Name" in listOf("Hello", "World"))
|
|
| |
|
|
| [Hello, World]
|
|
false
|
|
|
|
Assertion failed
|
|
assert(" in " in listOf("Hello", "World"))
|
|
| |
|
|
| [Hello, World]
|
|
false
|
|
|
|
Assertion failed
|
|
assert(
|
|
" in "
|
|
|
|
in
|
|
|
|
|
false
|
|
|
|
listOf("Hello", "World")
|
|
|
|
|
[Hello, World]
|
|
)
|
|
|
|
Assertion failed
|
|
assert("Name"/*in*/in/*in*/listOf("Hello", "World"))
|
|
| |
|
|
| [Hello, World]
|
|
false
|
|
|
|
Assertion failed
|
|
assert(("Name" in listOf("Hello", "World")) in listOf(true))
|
|
| | | |
|
|
| | | [true]
|
|
| | false
|
|
| [Hello, World]
|
|
false |