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
@@ -6558,6 +6558,11 @@ public class IrJsCodegenBoxES6TestGenerated extends AbstractIrJsCodegenBoxES6Tes
runTest("compiler/testData/codegen/box/coroutines/suspendFunImportedFromObject.kt");
}
@TestMetadata("suspendFunctionAsSupertype.kt")
public void testSuspendFunctionAsSupertype() throws Exception {
runTest("compiler/testData/codegen/box/coroutines/suspendFunctionAsSupertype.kt");
}
@TestMetadata("suspendFunctionMethodReference.kt")
public void testSuspendFunctionMethodReference() throws Exception {
runTest("compiler/testData/codegen/box/coroutines/suspendFunctionMethodReference.kt");
@@ -5969,6 +5969,11 @@ public class IrJsCodegenBoxTestGenerated extends AbstractIrJsCodegenBoxTest {
runTest("compiler/testData/codegen/box/coroutines/suspendFunImportedFromObject.kt");
}
@TestMetadata("suspendFunctionAsSupertype.kt")
public void testSuspendFunctionAsSupertype() throws Exception {
runTest("compiler/testData/codegen/box/coroutines/suspendFunctionAsSupertype.kt");
}
@TestMetadata("suspendFunctionMethodReference.kt")
public void testSuspendFunctionMethodReference() throws Exception {
runTest("compiler/testData/codegen/box/coroutines/suspendFunctionMethodReference.kt");
@@ -5969,6 +5969,11 @@ public class JsCodegenBoxTestGenerated extends AbstractJsCodegenBoxTest {
runTest("compiler/testData/codegen/box/coroutines/suspendFunImportedFromObject.kt");
}
@TestMetadata("suspendFunctionAsSupertype.kt")
public void testSuspendFunctionAsSupertype() throws Exception {
runTest("compiler/testData/codegen/box/coroutines/suspendFunctionAsSupertype.kt");
}
@TestMetadata("suspendFunctionMethodReference.kt")
public void testSuspendFunctionMethodReference() throws Exception {
runTest("compiler/testData/codegen/box/coroutines/suspendFunctionMethodReference.kt");