Files
kotlin-fork/compiler/fir/analysis-tests/testData/resolve/callResolution/invokeAmbiguity.kt
T
Denis Zharkov 6cc6b9efcb FIR: Fix overload resolution for some invoke cases
Namely, it's about the cases when there are multiple variable candidates
with the same priority and all of them should be collected and compared
2020-04-02 12:10:50 +03:00

18 lines
269 B
Kotlin
Vendored

open class A {
operator fun invoke(f: () -> Unit): Int = 1
}
class B {
operator fun invoke(f: () -> Unit): CharSequence = ""
}
open class C
val C.attr: A get() = TODO()
open class D: C()
val D.attr: B get() = TODO()
fun box(d: D) {
(d.attr {}).length
}