[FIR2IR] Fix incorrect type of typealias for suspend functional type, ^KT-50997 Fixed
This commit is contained in:
@@ -107,12 +107,15 @@ fun ConeKotlinType.suspendFunctionTypeToFunctionTypeWithContinuation(session: Fi
|
||||
if (isKFunctionType(session)) FunctionClassKind.KFunction
|
||||
else FunctionClassKind.Function
|
||||
val functionalTypeId = ClassId(kind.packageFqName, kind.numberedClassName(typeArguments.size))
|
||||
val fullyExpandedType = type.fullyExpandedType(session)
|
||||
val typeArguments = fullyExpandedType.typeArguments
|
||||
val lastTypeArgument = typeArguments.last()
|
||||
return ConeClassLikeTypeImpl(
|
||||
ConeClassLikeLookupTagImpl(functionalTypeId),
|
||||
typeArguments = (type.typeArguments.dropLast(1) + ConeClassLikeLookupTagImpl(continuationClassId).constructClassType(
|
||||
arrayOf(type.typeArguments.last()),
|
||||
typeArguments = (typeArguments.dropLast(1) + ConeClassLikeLookupTagImpl(continuationClassId).constructClassType(
|
||||
arrayOf(lastTypeArgument),
|
||||
isNullable = false
|
||||
) + type.typeArguments.last()).toTypedArray(),
|
||||
) + lastTypeArgument).toTypedArray(),
|
||||
isNullable = false,
|
||||
attributes = attributes
|
||||
)
|
||||
|
||||
Reference in New Issue
Block a user