Files
kotlin-fork/compiler/testData/diagnostics/tests/classObjects/InnerClassAccessThroughEnum.kt
T
Denis Zharkov a7fc32c8da Add diagnostic on calling inner classes constructors without receiver
Otherwise there will be just an unresolved reference that doesn't give
any useful information

 #KT-8959 Fixed
2017-03-01 09:59:01 +03:00

49 lines
783 B
Kotlin
Vendored

package a
enum class C {
E1, E2, E3 {
object O_O
fun b() {
O_O
}
class G
},
E4 {
fun c() {
this.B()
C.A()
A()
//TODO: should be resolved with error
this.<!UNRESOLVED_REFERENCE!>A<!>()
}
};
class A
inner class B
object O {
object InO
}
}
fun f() {
C.E1.<!UNRESOLVED_REFERENCE!>A<!>
C.E1.<!UNRESOLVED_REFERENCE!>A<!>()
C.E2.B()
C.E2.<!UNRESOLVED_REFERENCE!>O<!>
C.E3.<!UNRESOLVED_REFERENCE!>O<!>.<!DEBUG_INFO_ELEMENT_WITH_ERROR_TYPE!>InO<!>
C.O
C.O.InO
C.A()
C.<!RESOLUTION_TO_CLASSIFIER!>B<!>()
C.E3.<!UNRESOLVED_REFERENCE!>O_O<!>
C.E3.<!UNRESOLVED_REFERENCE!>G<!>()
}