'SuspendFunction$n' should not be visible in member scopes (should be unresolved).

'SuspendFunction$n' class descriptors are created on demand by KotlinBuiltIns (and cached).
On serialization, types constructed with 'SuspendFunction$n' are written as 'Function$n' with extra flag (SUSPEND_TYPE).
On deserialization, corresponding 'SuspendFunction$n' classes are used.
This commit is contained in:
Dmitry Petrov
2016-12-15 12:34:03 +03:00
committed by Stanislav Erokhin
parent a70ac0160d
commit 80bd916f5d
26 changed files with 511 additions and 133 deletions
@@ -4466,6 +4466,12 @@ public class DiagnosticsTestGenerated extends AbstractDiagnosticsTest {
String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/coroutines/suspendFunctionType/noInvokeForSuspendFunction.kt");
doTest(fileName);
}
@TestMetadata("suspendFunctionNIsUnresolved.kt")
public void testSuspendFunctionNIsUnresolved() throws Exception {
String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/coroutines/suspendFunctionType/suspendFunctionNIsUnresolved.kt");
doTest(fileName);
}
}
@TestMetadata("compiler/testData/diagnostics/tests/coroutines/tailCalls")
@@ -4805,6 +4805,12 @@ public class LoadJavaTestGenerated extends AbstractLoadJavaTest {
doTestCompiledKotlin(fileName);
}
@TestMetadata("SuspendFunction.kt")
public void testSuspendFunction() throws Exception {
String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/loadJava/compiledKotlin/type/SuspendFunction.kt");
doTestCompiledKotlin(fileName);
}
@TestMetadata("Unit.kt")
public void testUnit() throws Exception {
String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/loadJava/compiledKotlin/type/Unit.kt");
@@ -3038,6 +3038,12 @@ public class LoadKotlinWithTypeTableTestGenerated extends AbstractLoadKotlinWith
doTest(fileName);
}
@TestMetadata("SuspendFunction.kt")
public void testSuspendFunction() throws Exception {
String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/loadJava/compiledKotlin/type/SuspendFunction.kt");
doTest(fileName);
}
@TestMetadata("Unit.kt")
public void testUnit() throws Exception {
String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/loadJava/compiledKotlin/type/Unit.kt");
@@ -3040,6 +3040,12 @@ public class JvmRuntimeDescriptorLoaderTestGenerated extends AbstractJvmRuntimeD
doTest(fileName);
}
@TestMetadata("SuspendFunction.kt")
public void testSuspendFunction() throws Exception {
String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/loadJava/compiledKotlin/type/SuspendFunction.kt");
doTest(fileName);
}
@TestMetadata("Unit.kt")
public void testUnit() throws Exception {
String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/loadJava/compiledKotlin/type/Unit.kt");