Files
kotlin-fork/compiler/testData/diagnostics/tests/resolve/implicitReceiverProperty.fir.kt
T
Mikhail Glukhikh de50f8aef3 FIR resolve: add partial support of extension lambda calls
Here we introduce ONLY_IMPLICIT_RECEIVER tower level
to support extension lambda calls on local variables,
and soften extension receiver checks to make such extensions visible & applicable.
Also here we try to map arguments twice for functional types
2019-12-27 09:57:36 +03:00

33 lines
465 B
Kotlin
Vendored

// FILE: a.kt
package a
class A(val b: String) {
companion object {
val c: String = ""
}
fun mtd() = c.length
}
// FILE: b.kt
package b
// FILE: c.kt
package c
// FILE: test.kt
package test
import a.A
fun <T, R> T.with(f: T.() -> R) = f()
fun A.extFun1() = b.length
// fun A.extFun2() = c.length // TODO fix KT-9953
val x1 = A("").with { b.length }
// val x2 = A("").with { c.length } // TODO fix KT-9953
val x3 = A.with { c.length }