3279313f2c
See K1 counterpart at org.jetbrains.kotlin.resolve.calls.tower.TowerResolver.Task.processImplicitReceiver ^KT-58943 Fixed ^KT-59541 Fixed
36 lines
785 B
Kotlin
Vendored
36 lines
785 B
Kotlin
Vendored
class A {
|
|
fun bar() {
|
|
val foo: String.() -> Unit = {} // (1)
|
|
fun String.foo(): Unit {} // (2)
|
|
"1".foo() // resolves to (2)
|
|
with("2") {
|
|
foo() // resolves to (1)
|
|
}
|
|
}
|
|
}
|
|
class B {
|
|
val foo: String.() -> Unit = {} // (1)
|
|
fun String.foo(): Unit {} // (2)
|
|
fun bar() {
|
|
"1".foo() // resolves to (2)
|
|
with("2") {
|
|
foo() // resolves to (2)
|
|
}
|
|
}
|
|
}
|
|
|
|
class E {
|
|
object f {
|
|
operator fun invoke() = Unit // (1)
|
|
}
|
|
companion object {
|
|
val f: () -> Unit = {} // (2)
|
|
}
|
|
}
|
|
|
|
fun main() {
|
|
E.f // Resolves to (2) in old FE (Resolves to (1) in FIR)
|
|
E.f() // Resolves to (2) in old FE (Resolves to (1) in FIR)
|
|
E.f.invoke() // Resolves to (1) in old FE and FIR
|
|
}
|