Report error when suspend call is illegal in the scope

Namely when it's not contained inside coroutine or another suspend function

 #KT-14924 In Progress
This commit is contained in:
Denis Zharkov
2016-11-30 14:59:58 +03:00
parent 240d82d167
commit aa50f1d824
6 changed files with 38 additions and 2 deletions
@@ -4252,6 +4252,12 @@ public class DiagnosticsTestGenerated extends AbstractDiagnosticsTest {
doTest(fileName);
}
@TestMetadata("illegalSuspendCalls.kt")
public void testIllegalSuspendCalls() throws Exception {
String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/coroutines/illegalSuspendCalls.kt");
doTest(fileName);
}
@TestMetadata("interceptResume.kt")
public void testInterceptResume() throws Exception {
String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/coroutines/interceptResume.kt");