Support suspend functions as superinterfaces

Forbid mixing suspend and non-suspend functional supertypes.
Since JVM BE generates suspend functional types as non-suspend ones
with SuspendFunction marker interface, there is not way to distinguish
non-suspend functional type from suspend one if they are mixed.
 #KT-18707 Fixed
This commit is contained in:
Ilmir Usmanov
2021-04-26 16:16:25 +02:00
parent 37ccd82b6c
commit dc2485ae71
44 changed files with 1439 additions and 2 deletions
@@ -6801,6 +6801,11 @@ public class LightAnalysisModeTestGenerated extends AbstractLightAnalysisModeTes
runTest("compiler/testData/codegen/box/coroutines/kt38099.kt");
}
@TestMetadata("suspendFunctionAsSupertype.kt")
public void ignoreSuspendFunctionAsSupertype() throws Exception {
runTest("compiler/testData/codegen/box/coroutines/suspendFunctionAsSupertype.kt");
}
private void runTest(String testDataFilePath) throws Exception {
KotlinTestUtils.runTest(this::doTest, TargetBackend.JVM, testDataFilePath);
}