[Commonizer] Restore lost nullability for underlying types in TAs
This commit is contained in:
+6
-1
@@ -57,9 +57,14 @@ object CirTypeFactory {
|
|||||||
Annotations.EMPTY
|
Annotations.EMPTY
|
||||||
) as AbbreviatedType
|
) as AbbreviatedType
|
||||||
|
|
||||||
|
val expandedType = extractExpandedType(abbreviatedType)
|
||||||
|
|
||||||
|
val cirExpandedType = create(expandedType, useAbbreviation = true) as CirClassOrTypeAliasType
|
||||||
|
val cirExpandedTypeWithProperNullability = if (source.isMarkedNullable) makeNullable(cirExpandedType) else cirExpandedType
|
||||||
|
|
||||||
createTypeAliasType(
|
createTypeAliasType(
|
||||||
typeAliasId = classifierDescriptor.internedClassId,
|
typeAliasId = classifierDescriptor.internedClassId,
|
||||||
underlyingType = create(extractExpandedType(abbreviatedType), useAbbreviation = true) as CirClassOrTypeAliasType,
|
underlyingType = cirExpandedTypeWithProperNullability,
|
||||||
arguments = createArguments(source.arguments, useAbbreviation = true),
|
arguments = createArguments(source.arguments, useAbbreviation = true),
|
||||||
isMarkedNullable = source.isMarkedNullable
|
isMarkedNullable = source.isMarkedNullable
|
||||||
)
|
)
|
||||||
|
|||||||
Reference in New Issue
Block a user