diff --git a/compiler/fir/providers/src/org/jetbrains/kotlin/fir/FirVisibilityChecker.kt b/compiler/fir/providers/src/org/jetbrains/kotlin/fir/FirVisibilityChecker.kt index 6b3fa67f549..7be73961585 100644 --- a/compiler/fir/providers/src/org/jetbrains/kotlin/fir/FirVisibilityChecker.kt +++ b/compiler/fir/providers/src/org/jetbrains/kotlin/fir/FirVisibilityChecker.kt @@ -468,6 +468,7 @@ abstract class FirVisibilityChecker : FirSessionComponent { protected fun FirBasedSymbol<*>.packageFqName(): FqName { return when (this) { is FirClassLikeSymbol<*> -> classId.packageFqName + is FirPropertyAccessorSymbol -> propertySymbol.packageFqName() is FirCallableSymbol<*> -> callableId.packageName else -> error("No package fq name for $this") } diff --git a/compiler/testData/diagnostics/tests/protectedWithGenericsInDifferentPackage.fir.kt b/compiler/testData/diagnostics/tests/protectedWithGenericsInDifferentPackage.fir.kt index 0fe32c505bd..d945df12f2c 100644 --- a/compiler/testData/diagnostics/tests/protectedWithGenericsInDifferentPackage.fir.kt +++ b/compiler/testData/diagnostics/tests/protectedWithGenericsInDifferentPackage.fir.kt @@ -28,7 +28,7 @@ fun test(s: bar.Sub) { s.name s.name = "" s.name2 - s.name2 = "" + s.name2 = "" s.doSomething() s.doSomething2() val s2: Super = s