diff --git a/compiler/testData/diagnostics/tests/inline/nonPublicMember/protectedInlineInsideInternal.fir.kt b/compiler/testData/diagnostics/tests/inline/nonPublicMember/protectedInlineInsideInternal.fir.kt deleted file mode 100644 index ed41958bfeb..00000000000 --- a/compiler/testData/diagnostics/tests/inline/nonPublicMember/protectedInlineInsideInternal.fir.kt +++ /dev/null @@ -1,10 +0,0 @@ -// ISSUE: KT-58757 - -internal abstract class Foo { - abstract val context: CharSequence -} - -internal abstract class Bar(protected val foo: Foo) { - protected inline val inlineContext: String - get() = foo.context as String -} diff --git a/compiler/testData/diagnostics/tests/inline/nonPublicMember/protectedInlineInsideInternal.kt b/compiler/testData/diagnostics/tests/inline/nonPublicMember/protectedInlineInsideInternal.kt index a8144370534..e91105f3673 100644 --- a/compiler/testData/diagnostics/tests/inline/nonPublicMember/protectedInlineInsideInternal.kt +++ b/compiler/testData/diagnostics/tests/inline/nonPublicMember/protectedInlineInsideInternal.kt @@ -1,3 +1,4 @@ +// FIR_IDENTICAL // ISSUE: KT-58757 internal abstract class Foo { diff --git a/core/compiler.common/src/org/jetbrains/kotlin/descriptors/EffectiveVisibility.kt b/core/compiler.common/src/org/jetbrains/kotlin/descriptors/EffectiveVisibility.kt index d9755192f34..0110637ccf1 100644 --- a/core/compiler.common/src/org/jetbrains/kotlin/descriptors/EffectiveVisibility.kt +++ b/core/compiler.common/src/org/jetbrains/kotlin/descriptors/EffectiveVisibility.kt @@ -121,12 +121,12 @@ sealed class EffectiveVisibility(val name: String, val publicApi: Boolean = fals Public -> this PrivateInClass, PrivateInFile, Local, ProtectedBound, InternalProtectedBound -> other is Protected -> when (relation(other, typeCheckerContextProvider)) { - Permissiveness.SAME, Permissiveness.MORE -> this - Permissiveness.LESS -> other + Permissiveness.SAME, Permissiveness.LESS -> this + Permissiveness.MORE -> other Permissiveness.UNKNOWN -> ProtectedBound } is InternalProtected -> when (relation(other, typeCheckerContextProvider)) { - Permissiveness.LESS -> other + Permissiveness.MORE -> other else -> InternalProtectedBound } is InternalOrPackage -> InternalProtected(containerTypeConstructor) @@ -192,8 +192,8 @@ sealed class EffectiveVisibility(val name: String, val publicApi: Boolean = fals Public, is InternalOrPackage -> this PrivateInClass, PrivateInFile, Local, InternalProtectedBound -> other is Protected, is InternalProtected -> when (relation(other, typeCheckerContextProvider)) { - Permissiveness.SAME, Permissiveness.MORE -> this - Permissiveness.LESS -> other + Permissiveness.SAME, Permissiveness.LESS -> this + Permissiveness.MORE -> other Permissiveness.UNKNOWN -> InternalProtectedBound } ProtectedBound -> InternalProtectedBound