Refine isVisible for protected visibility
#KT-7437 Fixed #KT-7971 Fixed #KT-7051 Fixed #KT-6125 Fixed #KT-6186 Fixed
This commit is contained in:
+15
@@ -0,0 +1,15 @@
|
||||
open class A {
|
||||
open protected fun foo() { }
|
||||
open protected fun foobaz() { }
|
||||
|
||||
fun bar(x: B) {
|
||||
x.foo() // OK, foo declared in A
|
||||
x.<!INVISIBLE_MEMBER!>baz<!>() // Declared in B
|
||||
x.<!INVISIBLE_MEMBER!>foobaz<!>() // Declared in B
|
||||
}
|
||||
}
|
||||
|
||||
class B : A() {
|
||||
protected fun baz() {}
|
||||
override fun foobaz() {}
|
||||
}
|
||||
Reference in New Issue
Block a user