Files
kotlin/compiler/testData/diagnostics/testsWithStdLib/callableReference/function/nestedConstructorFromExtension.kt
Svetlana Isakova 17c3eeb7bd Added error 'NESTED_CLASS_SHOULD_BE_QUALIFIED'
when nested class is resolved through implicit this
2014-09-01 12:32:54 +04:00

20 lines
340 B
Kotlin

// !DIAGNOSTICS: -UNUSED_EXPRESSION
import kotlin.reflect.KFunction0
class A {
class Nested
}
fun A.main() {
::<!NESTED_CLASS_SHOULD_BE_QUALIFIED!>Nested<!>
val y = A::Nested
y : KFunction0<A.Nested>
}
fun Int.main() {
::<!UNRESOLVED_REFERENCE!>Nested<!>
val y = A::Nested
y : KFunction0<A.Nested>
}