KT-4529 Lambdas are analyzed improperly in an infix call nested inside a println
#KT-4529 Fixed
This commit is contained in:
@@ -0,0 +1,19 @@
|
||||
//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
|
||||
Reference in New Issue
Block a user