70374ea9be
#KT-4529 Fixed
19 lines
358 B
Kotlin
19 lines
358 B
Kotlin
//KT-4529 Lambdas are analyzed improperly in an infix call nested inside a println
|
|
|
|
class G {
|
|
fun foo(bar: (Int) -> Int) = bar
|
|
}
|
|
|
|
fun main(args: Array<String>) {
|
|
use(
|
|
G().foo {it + 11} // no error
|
|
)
|
|
use(
|
|
G() foo {it + 11} // ERROR
|
|
)
|
|
use(
|
|
G() foo ({it + 1}) // 2 ERRORs
|
|
)
|
|
}
|
|
|
|
fun use(a: Any?) = a |