Files
kotlin-fork/compiler/testData/diagnostics/tests/exposed/protected.kt
T
Dmitrii Gridin 9a4a3d1f49 [LL FIR] introduce test with reversed resolve order
^KT-56543

Merge-request: KT-MR-9299
Merged-by: Dmitrii Gridin <dmitry.gridin@jetbrains.com>
2023-03-22 17:34:07 +00:00

21 lines
529 B
Kotlin
Vendored

// IGNORE_REVERSED_RESOLVE
open class A {
// protected relative to A
protected open class B {
fun foo() {}
}
public open class C {
// protected relative to C, must be an error
protected open class D : <!EXPOSED_SUPER_CLASS!>B()<!>
}
}
class E : A.C() {
// F has invisible grandparent class B (E does not inherit from A)
class F : <!EXPOSED_SUPER_CLASS!>A.C.D()<!> {
init {
// Invoke function from invisible grandparent
foo()
}
}
}