[K2] KT-60080 Fix packageFqn for property accessor symbol

^KT-60080 fixed
This commit is contained in:
Ilya Goncharov
2023-10-12 17:44:47 +00:00
committed by Space Team
parent a318cd455d
commit 1fd9706f47
2 changed files with 2 additions and 1 deletions
@@ -468,6 +468,7 @@ abstract class FirVisibilityChecker : FirSessionComponent {
protected fun FirBasedSymbol<*>.packageFqName(): FqName { protected fun FirBasedSymbol<*>.packageFqName(): FqName {
return when (this) { return when (this) {
is FirClassLikeSymbol<*> -> classId.packageFqName is FirClassLikeSymbol<*> -> classId.packageFqName
is FirPropertyAccessorSymbol -> propertySymbol.packageFqName()
is FirCallableSymbol<*> -> callableId.packageName is FirCallableSymbol<*> -> callableId.packageName
else -> error("No package fq name for $this") else -> error("No package fq name for $this")
} }
@@ -28,7 +28,7 @@ fun test(s: bar.Sub<String>) {
s.<!INVISIBLE_REFERENCE!>name<!> s.<!INVISIBLE_REFERENCE!>name<!>
s.<!INVISIBLE_REFERENCE, INVISIBLE_SETTER!>name<!> = "" s.<!INVISIBLE_REFERENCE, INVISIBLE_SETTER!>name<!> = ""
s.name2 s.name2
s.<!INVISIBLE_SETTER!>name2<!> = "" s.name2 = ""
s.<!INVISIBLE_REFERENCE!>doSomething<!>() s.<!INVISIBLE_REFERENCE!>doSomething<!>()
s.doSomething2() s.doSomething2()
val s2: Super<String> = s val s2: Super<String> = s