Enable suspend in fun interfaces by default
#KT-45836 Fixed
This commit is contained in:
committed by
TeamCityServer
parent
572c0b2ade
commit
b5ecccb610
+1
-1
@@ -501,7 +501,7 @@ default: `indy-with-constants` for JVM target 9 or greater, `inline` otherwise""
|
|||||||
result[JvmAnalysisFlags.enableJvmPreview] = enableJvmPreview
|
result[JvmAnalysisFlags.enableJvmPreview] = enableJvmPreview
|
||||||
result[AnalysisFlags.allowUnstableDependencies] = allowUnstableDependencies || useFir
|
result[AnalysisFlags.allowUnstableDependencies] = allowUnstableDependencies || useFir
|
||||||
result[JvmAnalysisFlags.disableUltraLightClasses] = disableUltraLightClasses
|
result[JvmAnalysisFlags.disableUltraLightClasses] = disableUltraLightClasses
|
||||||
result[JvmAnalysisFlags.useIR] = useIR
|
result[JvmAnalysisFlags.useIR] = !useOldBackend
|
||||||
return result
|
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");
|
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")
|
@TestMetadata("suspendInFunInterfaceIrDisabled.args")
|
||||||
public void testSuspendInFunInterfaceIrDisabled() throws Exception {
|
public void testSuspendInFunInterfaceIrDisabled() throws Exception {
|
||||||
runTest("compiler/testData/cli/jvm/suspendInFunInterfaceIrDisabled.args");
|
runTest("compiler/testData/cli/jvm/suspendInFunInterfaceIrDisabled.args");
|
||||||
|
|||||||
+10
-10
@@ -8125,11 +8125,6 @@ public class LightAnalysisModeTestGenerated extends AbstractLightAnalysisModeTes
|
|||||||
@TestDataPath("$PROJECT_ROOT")
|
@TestDataPath("$PROJECT_ROOT")
|
||||||
@RunWith(JUnit3RunnerWithInners.class)
|
@RunWith(JUnit3RunnerWithInners.class)
|
||||||
public static class Resume extends AbstractLightAnalysisModeTest {
|
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 {
|
private void runTest(String testDataFilePath) throws Exception {
|
||||||
KotlinTestUtils.runTest(this::doTest, TargetBackend.JVM, testDataFilePath);
|
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");
|
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")
|
@TestMetadata("boxUnboxInsideCoroutine.kt")
|
||||||
public void testBoxUnboxInsideCoroutine() throws Exception {
|
public void testBoxUnboxInsideCoroutine() throws Exception {
|
||||||
runTest("compiler/testData/codegen/box/coroutines/inlineClasses/resume/boxUnboxInsideCoroutine.kt");
|
runTest("compiler/testData/codegen/box/coroutines/inlineClasses/resume/boxUnboxInsideCoroutine.kt");
|
||||||
@@ -8363,11 +8363,6 @@ public class LightAnalysisModeTestGenerated extends AbstractLightAnalysisModeTes
|
|||||||
@TestDataPath("$PROJECT_ROOT")
|
@TestDataPath("$PROJECT_ROOT")
|
||||||
@RunWith(JUnit3RunnerWithInners.class)
|
@RunWith(JUnit3RunnerWithInners.class)
|
||||||
public static class ResumeWithException extends AbstractLightAnalysisModeTest {
|
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 {
|
private void runTest(String testDataFilePath) throws Exception {
|
||||||
KotlinTestUtils.runTest(this::doTest, TargetBackend.JVM, testDataFilePath);
|
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");
|
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")
|
@TestMetadata("boxUnboxInsideCoroutine.kt")
|
||||||
public void testBoxUnboxInsideCoroutine() throws Exception {
|
public void testBoxUnboxInsideCoroutine() throws Exception {
|
||||||
runTest("compiler/testData/codegen/box/coroutines/inlineClasses/resumeWithException/boxUnboxInsideCoroutine.kt");
|
runTest("compiler/testData/codegen/box/coroutines/inlineClasses/resumeWithException/boxUnboxInsideCoroutine.kt");
|
||||||
|
|||||||
Reference in New Issue
Block a user