Files
kotlin-fork/compiler/testData/diagnostics/tests/callableReference/resolve/moreSpecificSimple.kt
T
Juan Chen a1e0e8b0e7 [FIR] Handle receiver types of extension methods when computing maximally specific types.
Test case (from testPrimitiveReceiver):

fun Short.foo() = 3
fun Int.foo() = 4

1::foo
2020-04-15 11:16:33 +03:00

14 lines
187 B
Kotlin
Vendored

// FIR_IDENTICAL
// !CHECK_TYPE
interface IA
interface IB : IA
fun IA.extFun() {}
fun IB.extFun() {}
fun test() {
val extFun = IB::extFun
checkSubtype<IB.() -> Unit>(extFun)
}