Warn about suspend extension functional types as supertypes

They will become error in 2.0

 #KT-58529 Fixed
 #KT-49175 Fixed
This commit is contained in:
Ilmir Usmanov
2023-05-15 20:24:53 +02:00
parent b19116d3af
commit f3a22e0ac4
12 changed files with 145 additions and 0 deletions
@@ -32016,6 +32016,18 @@ public class DiagnosticCompilerTestFE10TestdataTestGenerated extends AbstractDia
runTest("compiler/testData/diagnostics/tests/subtyping/nestedLocalClasses.kt");
}
@Test
@TestMetadata("suspendExtFunctionTypeAsSuperType.kt")
public void testSuspendExtFunctionTypeAsSuperType() throws Exception {
runTest("compiler/testData/diagnostics/tests/subtyping/suspendExtFunctionTypeAsSuperType.kt");
}
@Test
@TestMetadata("suspendExtFunctionTypeAsSuperTypeRestrictionLifted.kt")
public void testSuspendExtFunctionTypeAsSuperTypeRestrictionLifted() throws Exception {
runTest("compiler/testData/diagnostics/tests/subtyping/suspendExtFunctionTypeAsSuperTypeRestrictionLifted.kt");
}
@Test
@TestMetadata("topLevelAnonymousObjects.kt")
public void testTopLevelAnonymousObjects() throws Exception {
@@ -32016,6 +32016,18 @@ public class LLFirPreresolvedReversedDiagnosticCompilerFE10TestDataTestGenerated
runTest("compiler/testData/diagnostics/tests/subtyping/nestedLocalClasses.kt");
}
@Test
@TestMetadata("suspendExtFunctionTypeAsSuperType.kt")
public void testSuspendExtFunctionTypeAsSuperType() throws Exception {
runTest("compiler/testData/diagnostics/tests/subtyping/suspendExtFunctionTypeAsSuperType.kt");
}
@Test
@TestMetadata("suspendExtFunctionTypeAsSuperTypeRestrictionLifted.kt")
public void testSuspendExtFunctionTypeAsSuperTypeRestrictionLifted() throws Exception {
runTest("compiler/testData/diagnostics/tests/subtyping/suspendExtFunctionTypeAsSuperTypeRestrictionLifted.kt");
}
@Test
@TestMetadata("topLevelAnonymousObjects.kt")
public void testTopLevelAnonymousObjects() throws Exception {