K2: add package FQ name to ClassId of anonymous objects
This is needed because in order to figure out which declarations are visible from anonymous objects in terms of overridability (see `FirVisibilityChecker.isVisibleForOverriding`), we need to get the package name of that anonymous object, because there's package-private visibility on JVM. #KT-62017 Fixed
This commit is contained in:
committed by
Space Team
parent
59a9855373
commit
5cae87b263
@@ -83,9 +83,9 @@ class FirRegularClassSymbol(classId: ClassId) : FirClassSymbol<FirRegularClass>(
|
||||
}
|
||||
}
|
||||
|
||||
val ANONYMOUS_CLASS_ID = ClassId(FqName.ROOT, FqName.topLevel(SpecialNames.ANONYMOUS), true)
|
||||
|
||||
class FirAnonymousObjectSymbol : FirClassSymbol<FirAnonymousObject>(ANONYMOUS_CLASS_ID)
|
||||
class FirAnonymousObjectSymbol(packageFqName: FqName) : FirClassSymbol<FirAnonymousObject>(
|
||||
ClassId(packageFqName, SpecialNames.ANONYMOUS_FQ_NAME, true)
|
||||
)
|
||||
|
||||
class FirTypeAliasSymbol(classId: ClassId) : FirClassLikeSymbol<FirTypeAlias>(classId), TypeAliasSymbolMarker {
|
||||
override fun toLookupTag(): ConeClassLikeLookupTag = classId.toLookupTag()
|
||||
|
||||
Reference in New Issue
Block a user