Support non-local returns to coroutine label from inline lambda

- Use proper class descriptor when retreiving continuation object (see previous commit)
- Use return type as VOID for such cases
- Load correct labels related to coroutine lambda from outer context
This commit is contained in:
Denis Zharkov
2016-05-25 15:28:44 +03:00
parent 94bd6dcc82
commit 611490e080
8 changed files with 167 additions and 7 deletions
@@ -4123,6 +4123,18 @@ public class BlackBoxCodegenTestGenerated extends AbstractBlackBoxCodegenTest {
doTest(fileName);
}
@TestMetadata("nonLocalReturnFromInlineLambda.kt")
public void testNonLocalReturnFromInlineLambda() throws Exception {
String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/coroutines/nonLocalReturnFromInlineLambda.kt");
doTest(fileName);
}
@TestMetadata("nonLocalReturnFromInlineLambdaDeep.kt")
public void testNonLocalReturnFromInlineLambdaDeep() throws Exception {
String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/coroutines/nonLocalReturnFromInlineLambdaDeep.kt");
doTest(fileName);
}
@TestMetadata("returnByLabel.kt")
public void testReturnByLabel() throws Exception {
String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/coroutines/returnByLabel.kt");