Files
kotlin-fork/compiler/testData/diagnostics/tests/callableReference/function/innerConstructorFromExtension.kt
T
Alexander Udalov 2877314313 Support "::foo" as a short-hand for "this::foo"
#KT-15667 Fixed
2017-09-08 10:59:44 +03:00

24 lines
405 B
Kotlin
Vendored

// !CHECK_TYPE
// !DIAGNOSTICS: -UNUSED_EXPRESSION
// !LANGUAGE: +CallableReferencesToClassMembersWithEmptyLHS
import kotlin.reflect.KFunction1
class A {
inner class Inner
}
fun A.main() {
::Inner
val y = A::Inner
checkSubtype<KFunction1<A, A.Inner>>(y)
}
fun Int.main() {
::<!UNRESOLVED_REFERENCE!>Inner<!>
val y = A::Inner
checkSubtype<KFunction1<A, A.Inner>>(y)
}