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
|
stubTypesEqualToAnything = false
|
||||||
)
|
)
|
||||||
if (AbstractTypeChecker.isSubtypeOf(
|
if (AbstractTypeChecker.isSubtypeOf(
|
||||||
typeCheckerState, dispatchReceiverType.fullyExpandedType(session), containingUseSiteClass.typeWithStarProjections()
|
typeCheckerState, dispatchReceiverType.fullyExpandedType(session), containingUseSiteClass.symbol.typeWithStarProjections()
|
||||||
)
|
)
|
||||||
) {
|
) {
|
||||||
return true
|
return true
|
||||||
|
|||||||
@@ -119,10 +119,10 @@ fun ClassId.defaultType(parameters: List<FirTypeParameterSymbol>): ConeClassLike
|
|||||||
isNullable = false,
|
isNullable = false,
|
||||||
)
|
)
|
||||||
|
|
||||||
fun FirClass.typeWithStarProjections(): ConeClassLikeType =
|
fun FirClassSymbol<*>.typeWithStarProjections(): ConeClassLikeType =
|
||||||
ConeClassLikeTypeImpl(
|
ConeClassLikeTypeImpl(
|
||||||
symbol.toLookupTag(),
|
this.toLookupTag(),
|
||||||
typeParameters.map { ConeStarProjection }.toTypedArray(),
|
typeParameterSymbols.map { ConeStarProjection }.toTypedArray(),
|
||||||
isNullable = false
|
isNullable = false
|
||||||
)
|
)
|
||||||
|
|
||||||
|
|||||||
+1
-2
@@ -260,8 +260,7 @@ class SerializationFirResolveExtension(session: FirSession) : FirDeclarationGene
|
|||||||
})
|
})
|
||||||
|
|
||||||
superTypeRefs += buildResolvedTypeRef {
|
superTypeRefs += buildResolvedTypeRef {
|
||||||
@OptIn(SymbolInternals::class)
|
type = generatedSerializerClassId.constructClassLikeType(arrayOf(owner.typeWithStarProjections()), isNullable = false)
|
||||||
type = generatedSerializerClassId.constructClassLikeType(arrayOf(owner.fir.typeWithStarProjections()), isNullable = false)
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
// TODO: add typed constructor
|
// TODO: add typed constructor
|
||||||
|
|||||||
Reference in New Issue
Block a user