Files
kotlin-fork/compiler/testData/diagnostics/tests/scopes/inheritance/innerClasses.kt
T
Ilya Chernikov 6356807997 Reapply "Only create descriptors for candidates with lambda args"
#KT-36247 fixed
A lot of testdata changed because significanly less (error) descriptors
are created for unresolved types, so diagnostics became different.
2020-02-14 11:41:30 +01:00

67 lines
1.1 KiB
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()
<!DEPRECATED_ACCESS_BY_SHORT_NAME!>C()<!>
}
object Z {
init {
<!RESOLUTION_TO_CLASSIFIER!>B<!>().<!DEBUG_INFO_MISSING_UNRESOLVED!>foo<!>()
<!RESOLUTION_TO_CLASSIFIER!>B<!>().<!DEBUG_INFO_MISSING_UNRESOLVED!>bar<!>()
<!RESOLUTION_TO_CLASSIFIER!>D<!>()
<!DEPRECATED_ACCESS_BY_SHORT_NAME!>C()<!>
}
}
}
class F: A() {
class B {
fun fas() {}
}
inner class D {
fun f() {}
}
init {
B().fas()
D().f()
}
companion object {
init {
B().fas()
<!RESOLUTION_TO_CLASSIFIER!>D<!>().<!DEBUG_INFO_MISSING_UNRESOLVED!>f<!>()
}
}
}