Files
kotlin-fork/compiler/testData/diagnostics/tests/callableReference/function/noAmbiguityMemberVsExtension.kt
T
Dmitry Petrov 954204da82 KT-1560
Report warning on extensions shadowed by members.
2017-01-16 17:25:13 +03:00

16 lines
208 B
Kotlin
Vendored

// !CHECK_TYPE
import kotlin.reflect.KFunction1
class A {
fun foo() = 42
}
fun A.<!EXTENSION_SHADOWED_BY_MEMBER!>foo<!>() {}
fun main() {
val x = A::foo
checkSubtype<KFunction1<A, Int>>(x)
}