Files
kotlin-fork/compiler/testData/diagnostics/tests/scopes/inheritance/nestedCompanionClassVsNestedJava.fir.kt
T
Denis Zharkov f71a56e742 FIR: Fix test data after rewritten scope structure
Mostly, the semantics for statics/companions has been changed there
Fixed test data now is much closer to semantics of old FE
2020-05-15 16:04:44 +03:00

48 lines
718 B
Kotlin
Vendored

// !LANGUAGE: -ProhibitVisibilityOfNestedClassifiersFromSupertypesOfCompanion
// FILE: 1.kt
open class A {
class Y {
fun A_Y() {}
}
companion object {
class Z {
fun A_C_Z() {}
}
}
}
// FILE: B.java
public class B extends A {
class Y {
void B_Y() {}
}
class Z {
void B_Z() {}
}
}
// FILE: C.java
public class C extends A {}
// FILE: 2.kt
class E: B() {
init {
Y().B_Y()
Y().<!UNRESOLVED_REFERENCE!>A_Y<!>()
Z().B_Z()
Z().<!UNRESOLVED_REFERENCE!>A_C_Z<!>()
}
}
class Y: C() {
init {
Y().A_Y()
<!UNRESOLVED_REFERENCE!>Z<!>().<!UNRESOLVED_REFERENCE!>A_C_Z<!>()
}
}