Do not add continuation parameter for super interface bridges
If there is superinterface (more specifically, fun interface) in one file with default suspend function, we lower the function, adding continuation parameter. Then, when we compile another file with a child, we generate a bridge to the default suspend function, which is already lowered. So, we do not need to add the continuation parameter. If the child is in the same file, then we add continuation parameter after we create a bridge, so, AddContinuationLowering can encounter bridges to suspend default functions in superinterfaces with continuation parameter only in multifile examples. #KT-47549 Fixed
This commit is contained in:
+28
-5
@@ -7280,11 +7280,6 @@ public class LightAnalysisModeTestGenerated extends AbstractLightAnalysisModeTes
|
||||
runTest("compiler/testData/codegen/box/coroutines/kt49168.kt");
|
||||
}
|
||||
|
||||
@TestMetadata("kt49294.kt")
|
||||
public void ignoreKt49294() throws Exception {
|
||||
runTest("compiler/testData/codegen/box/coroutines/kt49294.kt");
|
||||
}
|
||||
|
||||
@TestMetadata("suspendFunctionAsSupertype.kt")
|
||||
public void ignoreSuspendFunctionAsSupertype() throws Exception {
|
||||
runTest("compiler/testData/codegen/box/coroutines/suspendFunctionAsSupertype.kt");
|
||||
@@ -8366,6 +8361,34 @@ public class LightAnalysisModeTestGenerated extends AbstractLightAnalysisModeTes
|
||||
}
|
||||
}
|
||||
|
||||
@TestMetadata("compiler/testData/codegen/box/coroutines/featureIntersection/funInterface")
|
||||
@TestDataPath("$PROJECT_ROOT")
|
||||
@RunWith(JUnit3RunnerWithInners.class)
|
||||
public static class FunInterface extends AbstractLightAnalysisModeTest {
|
||||
@TestMetadata("kt49294.kt")
|
||||
public void ignoreKt49294() throws Exception {
|
||||
runTest("compiler/testData/codegen/box/coroutines/featureIntersection/funInterface/kt49294.kt");
|
||||
}
|
||||
|
||||
private void runTest(String testDataFilePath) throws Exception {
|
||||
KotlinTestUtils.runTest(this::doTest, TargetBackend.JVM, testDataFilePath);
|
||||
}
|
||||
|
||||
public void testAllFilesPresentInFunInterface() throws Exception {
|
||||
KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/codegen/box/coroutines/featureIntersection/funInterface"), Pattern.compile("^(.+)\\.kt$"), null, TargetBackend.JVM, true);
|
||||
}
|
||||
|
||||
@TestMetadata("kt47549.kt")
|
||||
public void testKt47549() throws Exception {
|
||||
runTest("compiler/testData/codegen/box/coroutines/featureIntersection/funInterface/kt47549.kt");
|
||||
}
|
||||
|
||||
@TestMetadata("kt47549_1.kt")
|
||||
public void testKt47549_1() throws Exception {
|
||||
runTest("compiler/testData/codegen/box/coroutines/featureIntersection/funInterface/kt47549_1.kt");
|
||||
}
|
||||
}
|
||||
|
||||
@TestMetadata("compiler/testData/codegen/box/coroutines/featureIntersection/jvmDefault")
|
||||
@TestDataPath("$PROJECT_ROOT")
|
||||
@RunWith(JUnit3RunnerWithInners.class)
|
||||
|
||||
Reference in New Issue
Block a user