Add 'suspendWithCurrentContinuation' and 'Suspend' object in built-ins

They are part of the new suspension convention, relevant
support in backends will be added in later commits

 #KT-14924 In Progress
This commit is contained in:
Denis Zharkov
2016-11-24 16:25:32 +03:00
parent a34c9c2580
commit 2c3b0aeddb
8 changed files with 113 additions and 1 deletions
@@ -4300,6 +4300,12 @@ public class DiagnosticsTestGenerated extends AbstractDiagnosticsTest {
doTest(fileName);
}
@TestMetadata("suspendWithCurrentContinuation.kt")
public void testSuspendWithCurrentContinuation() throws Exception {
String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/coroutines/suspendWithCurrentContinuation.kt");
doTest(fileName);
}
@TestMetadata("tryCatchLambda.kt")
public void testTryCatchLambda() throws Exception {
String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/coroutines/tryCatchLambda.kt");
@@ -91,7 +91,7 @@ public class LoadBuiltinsTest extends KotlinTestWithEnvironment {
ModuleDescriptor module =
LazyResolveTestUtilsKt.createResolveSessionForFiles(getEnvironment().getProject(), files, false).getModuleDescriptor();
for (FqName packageFqName : CollectionsKt.listOf(BUILT_INS_PACKAGE_FQ_NAME, COLLECTIONS_PACKAGE_FQ_NAME, RANGES_PACKAGE_FQ_NAME)) {
for (FqName packageFqName : CollectionsKt.listOf(BUILT_INS_PACKAGE_FQ_NAME, COLLECTIONS_PACKAGE_FQ_NAME, RANGES_PACKAGE_FQ_NAME, COROUTINES_PACKAGE_FQ_NAME)) {
PackageFragmentDescriptor fromLazyResolve =
CollectionsKt.single(module.getPackage(packageFqName).getFragments());
if (fromLazyResolve instanceof LazyPackageDescriptor) {