IR: generate lambdas in place in Psi2Ir

even when arguments are to be rearranged.
Lambdas have no side effects, and storing them in temporary variables
prevents processing in the backend
(such as inserting continuation parameter in AddContinuationLowering).
This commit is contained in:
Georgy Bronnikov
2020-03-19 11:45:23 +03:00
parent 915e6107d1
commit 4742057b51
9 changed files with 84 additions and 5 deletions
@@ -6880,6 +6880,16 @@ public class BlackBoxCodegenTestGenerated extends AbstractBlackBoxCodegenTest {
runTest("compiler/testData/codegen/box/coroutines/suspendJavaOverrides.kt");
}
@TestMetadata("suspendLambdaWithArgumentRearrangement.kt")
public void testSuspendLambdaWithArgumentRearrangement_1_2() throws Exception {
runTestWithPackageReplacement("compiler/testData/codegen/box/coroutines/suspendLambdaWithArgumentRearrangement.kt", "kotlin.coroutines.experimental");
}
@TestMetadata("suspendLambdaWithArgumentRearrangement.kt")
public void testSuspendLambdaWithArgumentRearrangement_1_3() throws Exception {
runTestWithPackageReplacement("compiler/testData/codegen/box/coroutines/suspendLambdaWithArgumentRearrangement.kt", "kotlin.coroutines");
}
@TestMetadata("suspendReturningPlatformType.kt")
public void testSuspendReturningPlatformType() throws Exception {
runTest("compiler/testData/codegen/box/coroutines/suspendReturningPlatformType.kt");