[FIR] Fix CCE in deserialization of suspend function type with star projection continuation

#KT-64148 Fixed
This commit is contained in:
Kirill Rakhman
2023-12-13 11:21:15 +01:00
committed by Space Team
parent 01976990e8
commit 6d1ca3d379
21 changed files with 156 additions and 1 deletions
@@ -221,7 +221,7 @@ class FirTypeDeserializer(
val continuationType = arguments.getOrNull(arguments.lastIndex - 1) as? ConeClassLikeType ?: return null
if (!continuationType.isContinuation()) return ConeClassLikeTypeImpl(functionTypeConstructor, arguments, isNullable, attributes)
val suspendReturnType = continuationType.typeArguments.single() as ConeKotlinTypeProjection
val suspendReturnType = continuationType.typeArguments.single()
val valueParameters = arguments.dropLast(2)
val kind = FunctionTypeKind.SuspendFunction
@@ -11157,6 +11157,12 @@ public class FirLightTreeBlackBoxCodegenTestGenerated extends AbstractFirLightTr
runTest("compiler/testData/codegen/box/coroutines/delegatedSuspendMember.kt");
}
@Test
@TestMetadata("deserializedSuspendFunctionProperty.kt")
public void testDeserializedSuspendFunctionProperty() throws Exception {
runTest("compiler/testData/codegen/box/coroutines/deserializedSuspendFunctionProperty.kt");
}
@Test
@TestMetadata("dispatchResume.kt")
public void testDispatchResume() throws Exception {
@@ -11157,6 +11157,12 @@ public class FirLightTreeBlackBoxCodegenWithIrFakeOverrideGeneratorTestGenerated
runTest("compiler/testData/codegen/box/coroutines/delegatedSuspendMember.kt");
}
@Test
@TestMetadata("deserializedSuspendFunctionProperty.kt")
public void testDeserializedSuspendFunctionProperty() throws Exception {
runTest("compiler/testData/codegen/box/coroutines/deserializedSuspendFunctionProperty.kt");
}
@Test
@TestMetadata("dispatchResume.kt")
public void testDispatchResume() throws Exception {
@@ -11157,6 +11157,12 @@ public class FirPsiBlackBoxCodegenTestGenerated extends AbstractFirPsiBlackBoxCo
runTest("compiler/testData/codegen/box/coroutines/delegatedSuspendMember.kt");
}
@Test
@TestMetadata("deserializedSuspendFunctionProperty.kt")
public void testDeserializedSuspendFunctionProperty() throws Exception {
runTest("compiler/testData/codegen/box/coroutines/deserializedSuspendFunctionProperty.kt");
}
@Test
@TestMetadata("dispatchResume.kt")
public void testDispatchResume() throws Exception {