Add language feature for suspend functions in fun interfaces

Since in 1.5 JVM_IR is enabled by default and supports suspend functions
in fun interfaces, it is safe to enable the feature by default as well.
This commit is contained in:
Ilmir Usmanov
2021-01-18 13:30:52 +01:00
parent 6aa6f82c47
commit d1ee45b518
9 changed files with 82 additions and 1 deletions
@@ -10060,6 +10060,28 @@ public class DiagnosticTestGenerated extends AbstractDiagnosticTest {
runTest("compiler/testData/diagnostics/tests/functionLiterals/return/unresolvedReferenceInReturnBlock.kt");
}
}
@Nested
@TestMetadata("compiler/testData/diagnostics/tests/functionLiterals/suspend")
@TestDataPath("$PROJECT_ROOT")
public class Suspend extends AbstractDiagnosticTest {
@Test
public void testAllFilesPresentInSuspend() throws Exception {
KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/diagnostics/tests/functionLiterals/suspend"), Pattern.compile("^(.*)\\.kts?$"), Pattern.compile("^(.+)\\.fir\\.kts?$"), true);
}
@Test
@TestMetadata("disabled.kt")
public void testDisabled() throws Exception {
runTest("compiler/testData/diagnostics/tests/functionLiterals/suspend/disabled.kt");
}
@Test
@TestMetadata("enabled.kt")
public void testEnabled() throws Exception {
runTest("compiler/testData/diagnostics/tests/functionLiterals/suspend/enabled.kt");
}
}
}
@Nested