Files
kotlin-fork/compiler/testData/diagnostics/tests/scopes/protectedVisibility/protectedCallOnSubClass.fir.kt
T
pyos e6d923f65c FIR: rename HIDDEN to INVISIBLE_REFERENCE
Some of them should be INVISIBLE_MEMBER though
2021-04-21 16:18:21 +03:00

16 lines
350 B
Kotlin
Vendored

open class A {
open protected fun foo() { }
open protected fun foobaz() { }
fun bar(x: B) {
x.foo() // OK, foo declared in A
x.<!INVISIBLE_REFERENCE!>baz<!>() // Declared in B
x.<!INVISIBLE_REFERENCE!>foobaz<!>() // Declared in B
}
}
class B : A() {
protected fun baz() {}
override fun foobaz() {}
}