Files
kotlin/compiler/testData/diagnostics/tests/callableReference/function/localConstructorFromExtensionInLocalClass.kt
2015-05-26 14:27:40 +03:00

19 lines
302 B
Kotlin
Vendored

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