[FIR] Handle protected effective visibility relation properly
#KT-38401 Fixed
This commit is contained in:
committed by
Mikhail Glukhikh
parent
07e9b9517a
commit
54cfd1f625
@@ -1,10 +0,0 @@
|
||||
public open class A {
|
||||
protected open class B
|
||||
}
|
||||
|
||||
public open class C : A() {
|
||||
protected open class D {
|
||||
// internal & protected(in C) <= protected(in A): Ok
|
||||
internal open class E : <!EXPOSED_SUPER_CLASS!>A.B<!>()
|
||||
}
|
||||
}
|
||||
@@ -1,3 +1,4 @@
|
||||
// FIR_IDENTICAL
|
||||
public open class A {
|
||||
protected open class B
|
||||
}
|
||||
|
||||
@@ -10,7 +10,7 @@ public abstract class Outer {
|
||||
|
||||
class OuterDerived: Outer() {
|
||||
// valid, My has better visibility
|
||||
protected class His: <!EXPOSED_SUPER_CLASS!>Outer.My<!>()
|
||||
protected class His: Outer.My()
|
||||
// valid, My and Your have better visibility
|
||||
override fun <!EXPOSED_FUNCTION_RETURN_TYPE!>foo<!>(<!EXPOSED_PARAMETER_TYPE!>my: Outer.My<!>) = Outer.Your()
|
||||
}
|
||||
@@ -7,7 +7,7 @@ abstract class Outer {
|
||||
|
||||
class OuterDerived: Outer() {
|
||||
// valid, My has better visibility
|
||||
protected class His: <!EXPOSED_SUPER_CLASS!>Outer.My<!>()
|
||||
protected class His: Outer.My()
|
||||
// valid, My and Your have better visibility
|
||||
override fun <!EXPOSED_FUNCTION_RETURN_TYPE!>foo<!>(<!EXPOSED_PARAMETER_TYPE!>my: Outer.My<!>) = Outer.Your()
|
||||
}
|
||||
@@ -7,7 +7,7 @@ open class Foo {
|
||||
}
|
||||
|
||||
class Bar: Foo() {
|
||||
protected fun <!EXPOSED_FUNCTION_RETURN_TYPE!>foo<!>(): Nested? = null
|
||||
protected fun foo(): Nested? = null
|
||||
}
|
||||
|
||||
private fun foo(): Nested? = null
|
||||
|
||||
Reference in New Issue
Block a user