Files
kotlin-fork/compiler/testData/diagnostics/tests/scopes/inheritance/innerClasses.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

67 lines
949 B
Kotlin
Vendored

// !LANGUAGE: -ProhibitVisibilityOfNestedClassifiersFromSupertypesOfCompanion
open class A {
inner class B {
fun foo() {}
}
inner class D
companion object {
class B {
fun bar() {}
}
class C
}
init {
B().foo()
B().<!UNRESOLVED_REFERENCE!>bar<!>()
D()
C()
}
}
class E: A() {
init {
B().foo()
B().<!UNRESOLVED_REFERENCE!>bar<!>()
D()
<!UNRESOLVED_REFERENCE!>C<!>()
}
object Z {
init {
B().foo()
B().<!UNRESOLVED_REFERENCE!>bar<!>()
D()
<!UNRESOLVED_REFERENCE!>C<!>()
}
}
}
class F: A() {
class B {
fun fas() {}
}
inner class D {
fun f() {}
}
init {
B().fas()
D().f()
}
companion object {
init {
B().fas()
D().f()
}
}
}