KT-15017 Throwing exception in the end of inline suspend-functions lead to internal compiler error

Suspend function call with a reachable (alive) begin marker and unreachable (dead) end marker
is an exit point for the corresponding coroutine.
It isn't a suspension point, and doesn't introduce a new state in the coroutine FSM.
This commit is contained in:
Dmitry Petrov
2017-01-24 16:46:52 +03:00
parent 3be1174824
commit e05f2eaff6
9 changed files with 137 additions and 22 deletions
@@ -5436,6 +5436,12 @@ public class JsCodegenBoxTestGenerated extends AbstractJsCodegenBoxTest {
doTest(fileName);
}
@TestMetadata("kt15017.kt")
public void testKt15017() throws Exception {
String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/coroutines/kt15017.kt");
doTest(fileName);
}
@TestMetadata("lastExpressionIsLoop.kt")
public void testLastExpressionIsLoop() throws Exception {
String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/coroutines/lastExpressionIsLoop.kt");