From 7f7bc1f36cdab92210843ff68a8de9a59240fd00 Mon Sep 17 00:00:00 2001 From: Mikhail Glukhikh Date: Wed, 20 Dec 2023 13:10:26 +0100 Subject: [PATCH] K2: add test to reproduce KT-63233 --- .../DiagnosticCompilerTestFE10TestdataTestGenerated.java | 6 ++++++ ...eversedDiagnosticCompilerFE10TestDataTestGenerated.java | 6 ++++++ .../FirLightTreeOldFrontendDiagnosticsTestGenerated.java | 6 ++++++ .../runners/FirPsiOldFrontendDiagnosticsTestGenerated.java | 6 ++++++ .../coroutines/suspendNotImplemented.fir.kt | 7 +++++++ .../testsWithStdLib/coroutines/suspendNotImplemented.kt | 7 +++++++ .../kotlin/test/runners/DiagnosticTestGenerated.java | 6 ++++++ 7 files changed, 44 insertions(+) create mode 100644 compiler/testData/diagnostics/testsWithStdLib/coroutines/suspendNotImplemented.fir.kt create mode 100644 compiler/testData/diagnostics/testsWithStdLib/coroutines/suspendNotImplemented.kt diff --git a/analysis/low-level-api-fir/tests/org/jetbrains/kotlin/analysis/low/level/api/fir/diagnostic/compiler/based/DiagnosticCompilerTestFE10TestdataTestGenerated.java b/analysis/low-level-api-fir/tests/org/jetbrains/kotlin/analysis/low/level/api/fir/diagnostic/compiler/based/DiagnosticCompilerTestFE10TestdataTestGenerated.java index 5d212b8e530..d2e4579888a 100644 --- a/analysis/low-level-api-fir/tests/org/jetbrains/kotlin/analysis/low/level/api/fir/diagnostic/compiler/based/DiagnosticCompilerTestFE10TestdataTestGenerated.java +++ b/analysis/low-level-api-fir/tests/org/jetbrains/kotlin/analysis/low/level/api/fir/diagnostic/compiler/based/DiagnosticCompilerTestFE10TestdataTestGenerated.java @@ -43176,6 +43176,12 @@ public class DiagnosticCompilerTestFE10TestdataTestGenerated extends AbstractDia runTest("compiler/testData/diagnostics/testsWithStdLib/coroutines/suspendLambda.kt"); } + @Test + @TestMetadata("suspendNotImplemented.kt") + public void testSuspendNotImplemented() throws Exception { + runTest("compiler/testData/diagnostics/testsWithStdLib/coroutines/suspendNotImplemented.kt"); + } + @Test @TestMetadata("suspendOverridability.kt") public void testSuspendOverridability() throws Exception { diff --git a/analysis/low-level-api-fir/tests/org/jetbrains/kotlin/analysis/low/level/api/fir/diagnostic/compiler/based/LLFirPreresolvedReversedDiagnosticCompilerFE10TestDataTestGenerated.java b/analysis/low-level-api-fir/tests/org/jetbrains/kotlin/analysis/low/level/api/fir/diagnostic/compiler/based/LLFirPreresolvedReversedDiagnosticCompilerFE10TestDataTestGenerated.java index 588c4304564..d21af13d874 100644 --- a/analysis/low-level-api-fir/tests/org/jetbrains/kotlin/analysis/low/level/api/fir/diagnostic/compiler/based/LLFirPreresolvedReversedDiagnosticCompilerFE10TestDataTestGenerated.java +++ b/analysis/low-level-api-fir/tests/org/jetbrains/kotlin/analysis/low/level/api/fir/diagnostic/compiler/based/LLFirPreresolvedReversedDiagnosticCompilerFE10TestDataTestGenerated.java @@ -43176,6 +43176,12 @@ public class LLFirPreresolvedReversedDiagnosticCompilerFE10TestDataTestGenerated runTest("compiler/testData/diagnostics/testsWithStdLib/coroutines/suspendLambda.kt"); } + @Test + @TestMetadata("suspendNotImplemented.kt") + public void testSuspendNotImplemented() throws Exception { + runTest("compiler/testData/diagnostics/testsWithStdLib/coroutines/suspendNotImplemented.kt"); + } + @Test @TestMetadata("suspendOverridability.kt") public void testSuspendOverridability() throws Exception { diff --git a/compiler/fir/analysis-tests/tests-gen/org/jetbrains/kotlin/test/runners/FirLightTreeOldFrontendDiagnosticsTestGenerated.java b/compiler/fir/analysis-tests/tests-gen/org/jetbrains/kotlin/test/runners/FirLightTreeOldFrontendDiagnosticsTestGenerated.java index b1b659f92f0..5d53f4b82a8 100644 --- a/compiler/fir/analysis-tests/tests-gen/org/jetbrains/kotlin/test/runners/FirLightTreeOldFrontendDiagnosticsTestGenerated.java +++ b/compiler/fir/analysis-tests/tests-gen/org/jetbrains/kotlin/test/runners/FirLightTreeOldFrontendDiagnosticsTestGenerated.java @@ -40902,6 +40902,12 @@ public class FirLightTreeOldFrontendDiagnosticsTestGenerated extends AbstractFir runTest("compiler/testData/diagnostics/testsWithStdLib/coroutines/suspendLambda.kt"); } + @Test + @TestMetadata("suspendNotImplemented.kt") + public void testSuspendNotImplemented() throws Exception { + runTest("compiler/testData/diagnostics/testsWithStdLib/coroutines/suspendNotImplemented.kt"); + } + @Test @TestMetadata("suspendOverridability.kt") public void testSuspendOverridability() throws Exception { diff --git a/compiler/fir/analysis-tests/tests-gen/org/jetbrains/kotlin/test/runners/FirPsiOldFrontendDiagnosticsTestGenerated.java b/compiler/fir/analysis-tests/tests-gen/org/jetbrains/kotlin/test/runners/FirPsiOldFrontendDiagnosticsTestGenerated.java index fa32e6395d7..c9e7d8f88ba 100644 --- a/compiler/fir/analysis-tests/tests-gen/org/jetbrains/kotlin/test/runners/FirPsiOldFrontendDiagnosticsTestGenerated.java +++ b/compiler/fir/analysis-tests/tests-gen/org/jetbrains/kotlin/test/runners/FirPsiOldFrontendDiagnosticsTestGenerated.java @@ -41022,6 +41022,12 @@ public class FirPsiOldFrontendDiagnosticsTestGenerated extends AbstractFirPsiDia runTest("compiler/testData/diagnostics/testsWithStdLib/coroutines/suspendLambda.kt"); } + @Test + @TestMetadata("suspendNotImplemented.kt") + public void testSuspendNotImplemented() throws Exception { + runTest("compiler/testData/diagnostics/testsWithStdLib/coroutines/suspendNotImplemented.kt"); + } + @Test @TestMetadata("suspendOverridability.kt") public void testSuspendOverridability() throws Exception { diff --git a/compiler/testData/diagnostics/testsWithStdLib/coroutines/suspendNotImplemented.fir.kt b/compiler/testData/diagnostics/testsWithStdLib/coroutines/suspendNotImplemented.fir.kt new file mode 100644 index 00000000000..9aeff89bfb1 --- /dev/null +++ b/compiler/testData/diagnostics/testsWithStdLib/coroutines/suspendNotImplemented.fir.kt @@ -0,0 +1,7 @@ +// ISSUE: KT-63233, KT-59818 + +interface A { + suspend fun foo() +} + +class B : A diff --git a/compiler/testData/diagnostics/testsWithStdLib/coroutines/suspendNotImplemented.kt b/compiler/testData/diagnostics/testsWithStdLib/coroutines/suspendNotImplemented.kt new file mode 100644 index 00000000000..f8813f8565f --- /dev/null +++ b/compiler/testData/diagnostics/testsWithStdLib/coroutines/suspendNotImplemented.kt @@ -0,0 +1,7 @@ +// ISSUE: KT-63233, KT-59818 + +interface A { + suspend fun foo() +} + +class B : A diff --git a/compiler/tests-common-new/tests-gen/org/jetbrains/kotlin/test/runners/DiagnosticTestGenerated.java b/compiler/tests-common-new/tests-gen/org/jetbrains/kotlin/test/runners/DiagnosticTestGenerated.java index cd26a7bca11..87de1da48eb 100644 --- a/compiler/tests-common-new/tests-gen/org/jetbrains/kotlin/test/runners/DiagnosticTestGenerated.java +++ b/compiler/tests-common-new/tests-gen/org/jetbrains/kotlin/test/runners/DiagnosticTestGenerated.java @@ -43176,6 +43176,12 @@ public class DiagnosticTestGenerated extends AbstractDiagnosticTest { runTest("compiler/testData/diagnostics/testsWithStdLib/coroutines/suspendLambda.kt"); } + @Test + @TestMetadata("suspendNotImplemented.kt") + public void testSuspendNotImplemented() throws Exception { + runTest("compiler/testData/diagnostics/testsWithStdLib/coroutines/suspendNotImplemented.kt"); + } + @Test @TestMetadata("suspendOverridability.kt") public void testSuspendOverridability() throws Exception {