Refine 'handleResult' calls generation within coroutines
Before this change everything works just fine for 'handleResult' methods accepting non-Unit parameters For other cases the same coercion-to-unit strategy is in plain lambdas: - if last statement is not Unit type, execute it, pop from the stack, then put Unit instance - for 'return@label' (no expression) just put Unit on the stack #KT-13531 Fixed
This commit is contained in:
@@ -4324,6 +4324,12 @@ public class BlackBoxCodegenTestGenerated extends AbstractBlackBoxCodegenTest {
|
||||
KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/testData/codegen/box/coroutines"), Pattern.compile("^(.+)\\.kt$"), true);
|
||||
}
|
||||
|
||||
@TestMetadata("coercionToUnit.kt")
|
||||
public void testCoercionToUnit() throws Exception {
|
||||
String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/coroutines/coercionToUnit.kt");
|
||||
doTest(fileName);
|
||||
}
|
||||
|
||||
@TestMetadata("controllerAccessFromInnerLambda.kt")
|
||||
public void testControllerAccessFromInnerLambda() throws Exception {
|
||||
String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/coroutines/controllerAccessFromInnerLambda.kt");
|
||||
|
||||
Reference in New Issue
Block a user