9a231bbbfa
Case of incorrect call expression as the receiver of dot-qualified expression was not handled properly. Now the following order is used: - If parent is a call expression or if this call is a receiver of parent dot-qualified expression, parent must get last lambda as a new receiver; - Otherwise, if parent is a dot-qualified expression, this call is in selector position. Then grandparent is checked for being call or dot-qualified expression. If so, trailing lambda must become grandparent's new receiver. If not, trailing nodes become standalone epressions after parent. - Otherwise, incorrect call expression is a standalone expression, so trailing nodes may be lifted and put after it.
10 lines
152 B
Kotlin
Vendored
10 lines
152 B
Kotlin
Vendored
// "Terminate preceding call with semicolon" "true"
|
|
|
|
fun foo() {}
|
|
|
|
fun test {
|
|
{ { { foo() } } }()()()
|
|
// comment and formatting
|
|
{<caret>}
|
|
}
|