Enable suspend in fun interfaces by default

#KT-45836 Fixed
This commit is contained in:
Ilmir Usmanov
2021-04-01 16:35:42 +02:00
committed by TeamCityServer
parent 572c0b2ade
commit b5ecccb610
6 changed files with 23 additions and 11 deletions
@@ -501,7 +501,7 @@ default: `indy-with-constants` for JVM target 9 or greater, `inline` otherwise""
result[JvmAnalysisFlags.enableJvmPreview] = enableJvmPreview
result[AnalysisFlags.allowUnstableDependencies] = allowUnstableDependencies || useFir
result[JvmAnalysisFlags.disableUltraLightClasses] = disableUltraLightClasses
result[JvmAnalysisFlags.useIR] = useIR
result[JvmAnalysisFlags.useIR] = !useOldBackend
return result
}
@@ -0,0 +1,3 @@
$TESTDATA_DIR$/suspendInFunInterfaceDefault.kt
-d
$TEMP_DIR$
@@ -0,0 +1,3 @@
fun interface FIC {
suspend fun foo()
}
@@ -0,0 +1 @@
OK
@@ -771,6 +771,11 @@ public class CliTestGenerated extends AbstractCliTest {
runTest("compiler/testData/cli/jvm/suppressAllWarningsJvm.args");
}
@TestMetadata("suspendInFunInterfaceDefault.args")
public void testSuspendInFunInterfaceDefault() throws Exception {
runTest("compiler/testData/cli/jvm/suspendInFunInterfaceDefault.args");
}
@TestMetadata("suspendInFunInterfaceIrDisabled.args")
public void testSuspendInFunInterfaceIrDisabled() throws Exception {
runTest("compiler/testData/cli/jvm/suspendInFunInterfaceIrDisabled.args");
@@ -8125,11 +8125,6 @@ public class LightAnalysisModeTestGenerated extends AbstractLightAnalysisModeTes
@TestDataPath("$PROJECT_ROOT")
@RunWith(JUnit3RunnerWithInners.class)
public static class Resume extends AbstractLightAnalysisModeTest {
@TestMetadata("boxTypeParameterOfSuperTypeResult.kt")
public void ignoreBoxTypeParameterOfSuperTypeResult() throws Exception {
runTest("compiler/testData/codegen/box/coroutines/inlineClasses/resume/boxTypeParameterOfSuperTypeResult.kt");
}
private void runTest(String testDataFilePath) throws Exception {
KotlinTestUtils.runTest(this::doTest, TargetBackend.JVM, testDataFilePath);
}
@@ -8153,6 +8148,11 @@ public class LightAnalysisModeTestGenerated extends AbstractLightAnalysisModeTes
runTest("compiler/testData/codegen/box/coroutines/inlineClasses/resume/boxTypeParameterOfSuperType.kt");
}
@TestMetadata("boxTypeParameterOfSuperTypeResult.kt")
public void testBoxTypeParameterOfSuperTypeResult() throws Exception {
runTest("compiler/testData/codegen/box/coroutines/inlineClasses/resume/boxTypeParameterOfSuperTypeResult.kt");
}
@TestMetadata("boxUnboxInsideCoroutine.kt")
public void testBoxUnboxInsideCoroutine() throws Exception {
runTest("compiler/testData/codegen/box/coroutines/inlineClasses/resume/boxUnboxInsideCoroutine.kt");
@@ -8363,11 +8363,6 @@ public class LightAnalysisModeTestGenerated extends AbstractLightAnalysisModeTes
@TestDataPath("$PROJECT_ROOT")
@RunWith(JUnit3RunnerWithInners.class)
public static class ResumeWithException extends AbstractLightAnalysisModeTest {
@TestMetadata("boxTypeParameterOfSuperTypeResult.kt")
public void ignoreBoxTypeParameterOfSuperTypeResult() throws Exception {
runTest("compiler/testData/codegen/box/coroutines/inlineClasses/resumeWithException/boxTypeParameterOfSuperTypeResult.kt");
}
private void runTest(String testDataFilePath) throws Exception {
KotlinTestUtils.runTest(this::doTest, TargetBackend.JVM, testDataFilePath);
}
@@ -8391,6 +8386,11 @@ public class LightAnalysisModeTestGenerated extends AbstractLightAnalysisModeTes
runTest("compiler/testData/codegen/box/coroutines/inlineClasses/resumeWithException/boxTypeParameterOfSuperType.kt");
}
@TestMetadata("boxTypeParameterOfSuperTypeResult.kt")
public void testBoxTypeParameterOfSuperTypeResult() throws Exception {
runTest("compiler/testData/codegen/box/coroutines/inlineClasses/resumeWithException/boxTypeParameterOfSuperTypeResult.kt");
}
@TestMetadata("boxUnboxInsideCoroutine.kt")
public void testBoxUnboxInsideCoroutine() throws Exception {
runTest("compiler/testData/codegen/box/coroutines/inlineClasses/resumeWithException/boxUnboxInsideCoroutine.kt");