K2: reproduce KT-57991

This commit is contained in:
Mikhail Glukhikh
2023-04-15 10:55:00 +02:00
committed by Space Team
parent 5a96754aec
commit c8b74e5655
7 changed files with 44 additions and 0 deletions
@@ -21262,6 +21262,12 @@ public class DiagnosticCompilerTestFE10TestdataTestGenerated extends AbstractDia
runTest("compiler/testData/diagnostics/tests/modifiers/repeatedModifiers.kt");
}
@Test
@TestMetadata("suspendAnonymousFunction.kt")
public void testSuspendAnonymousFunction() throws Exception {
runTest("compiler/testData/diagnostics/tests/modifiers/suspendAnonymousFunction.kt");
}
@Nested
@TestMetadata("compiler/testData/diagnostics/tests/modifiers/const")
@TestDataPath("$PROJECT_ROOT")
@@ -21262,6 +21262,12 @@ public class LLFirPreresolvedReversedDiagnosticCompilerFE10TestDataTestGenerated
runTest("compiler/testData/diagnostics/tests/modifiers/repeatedModifiers.kt");
}
@Test
@TestMetadata("suspendAnonymousFunction.kt")
public void testSuspendAnonymousFunction() throws Exception {
runTest("compiler/testData/diagnostics/tests/modifiers/suspendAnonymousFunction.kt");
}
@Nested
@TestMetadata("compiler/testData/diagnostics/tests/modifiers/const")
@TestDataPath("$PROJECT_ROOT")
@@ -21262,6 +21262,12 @@ public class FirLightTreeOldFrontendDiagnosticsTestGenerated extends AbstractFir
runTest("compiler/testData/diagnostics/tests/modifiers/repeatedModifiers.kt");
}
@Test
@TestMetadata("suspendAnonymousFunction.kt")
public void testSuspendAnonymousFunction() throws Exception {
runTest("compiler/testData/diagnostics/tests/modifiers/suspendAnonymousFunction.kt");
}
@Nested
@TestMetadata("compiler/testData/diagnostics/tests/modifiers/const")
@TestDataPath("$PROJECT_ROOT")
@@ -21268,6 +21268,12 @@ public class FirPsiOldFrontendDiagnosticsTestGenerated extends AbstractFirPsiDia
runTest("compiler/testData/diagnostics/tests/modifiers/repeatedModifiers.kt");
}
@Test
@TestMetadata("suspendAnonymousFunction.kt")
public void testSuspendAnonymousFunction() throws Exception {
runTest("compiler/testData/diagnostics/tests/modifiers/suspendAnonymousFunction.kt");
}
@Nested
@TestMetadata("compiler/testData/diagnostics/tests/modifiers/const")
@TestDataPath("$PROJECT_ROOT")
@@ -0,0 +1,7 @@
// ISSUE: KT-57991
fun foo() {
<!WRONG_MODIFIER_TARGET!>suspend<!> fun() {
}
}
@@ -0,0 +1,7 @@
// ISSUE: KT-57991
fun foo() {
suspend fun() {
}
}
@@ -21268,6 +21268,12 @@ public class DiagnosticTestGenerated extends AbstractDiagnosticTest {
runTest("compiler/testData/diagnostics/tests/modifiers/repeatedModifiers.kt");
}
@Test
@TestMetadata("suspendAnonymousFunction.kt")
public void testSuspendAnonymousFunction() throws Exception {
runTest("compiler/testData/diagnostics/tests/modifiers/suspendAnonymousFunction.kt");
}
@Nested
@TestMetadata("compiler/testData/diagnostics/tests/modifiers/const")
@TestDataPath("$PROJECT_ROOT")