Refactor typeWithStarProjections() so it uses FirClassSymbol instead of FirClass
It removes necessity to access .fir in plugins
This commit is contained in:
@@ -356,7 +356,7 @@ abstract class FirVisibilityChecker : FirSessionComponent {
|
||||
stubTypesEqualToAnything = false
|
||||
)
|
||||
if (AbstractTypeChecker.isSubtypeOf(
|
||||
typeCheckerState, dispatchReceiverType.fullyExpandedType(session), containingUseSiteClass.typeWithStarProjections()
|
||||
typeCheckerState, dispatchReceiverType.fullyExpandedType(session), containingUseSiteClass.symbol.typeWithStarProjections()
|
||||
)
|
||||
) {
|
||||
return true
|
||||
|
||||
@@ -119,10 +119,10 @@ fun ClassId.defaultType(parameters: List<FirTypeParameterSymbol>): ConeClassLike
|
||||
isNullable = false,
|
||||
)
|
||||
|
||||
fun FirClass.typeWithStarProjections(): ConeClassLikeType =
|
||||
fun FirClassSymbol<*>.typeWithStarProjections(): ConeClassLikeType =
|
||||
ConeClassLikeTypeImpl(
|
||||
symbol.toLookupTag(),
|
||||
typeParameters.map { ConeStarProjection }.toTypedArray(),
|
||||
this.toLookupTag(),
|
||||
typeParameterSymbols.map { ConeStarProjection }.toTypedArray(),
|
||||
isNullable = false
|
||||
)
|
||||
|
||||
|
||||
+1
-2
@@ -260,8 +260,7 @@ class SerializationFirResolveExtension(session: FirSession) : FirDeclarationGene
|
||||
})
|
||||
|
||||
superTypeRefs += buildResolvedTypeRef {
|
||||
@OptIn(SymbolInternals::class)
|
||||
type = generatedSerializerClassId.constructClassLikeType(arrayOf(owner.fir.typeWithStarProjections()), isNullable = false)
|
||||
type = generatedSerializerClassId.constructClassLikeType(arrayOf(owner.typeWithStarProjections()), isNullable = false)
|
||||
}
|
||||
}
|
||||
// TODO: add typed constructor
|
||||
|
||||
Reference in New Issue
Block a user