Files
kotlin-fork/compiler/testData/diagnostics/tests/scopes/protectedVisibility/protectedCallOnSubClass.fir.kt
T
Dmitriy Novozhilov bf1a00c73a [FIR] Rework resolution of declaration statuses
There is introduced algorithm of resolution with jumps: before
  resolution of some class we resolve all status of members of its
  supertypes, so we can properly determine inherited visibility
  and modifiers
2020-10-21 11:53:10 +03:00

16 lines
324 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.<!HIDDEN!>baz<!>() // Declared in B
x.<!HIDDEN!>foobaz<!>() // Declared in B
}
}
class B : A() {
protected fun baz() {}
override fun foobaz() {}
}