Test for KT-9430: proper visibility of protected members of base class

in child classes
This commit is contained in:
Dmitry Petrov
2015-10-08 18:07:40 +03:00
parent b6caedbc82
commit 51225d3556
3 changed files with 56 additions and 0 deletions
+16
View File
@@ -0,0 +1,16 @@
open class A {
protected fun foo() {}
}
class B: A()
class C: A() {
fun bar() {
A().foo()
B().<!INVISIBLE_MEMBER!>foo<!>()
}
}
class D {
fun qux() { B().<!INVISIBLE_MEMBER!>foo<!>() }
}