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 f4861dfffdc..64dc19e541b 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 @@ -6204,6 +6204,12 @@ public class DiagnosticCompilerTestFE10TestdataTestGenerated extends AbstractDia runTest("compiler/testData/diagnostics/tests/controlFlowAnalysis/capturingUninitializedVariableInNonInPlaceLambda.kt"); } + @Test + @TestMetadata("cfgOfFullyIncorrectCode.kt") + public void testCfgOfFullyIncorrectCode() throws Exception { + runTest("compiler/testData/diagnostics/tests/controlFlowAnalysis/cfgOfFullyIncorrectCode.kt"); + } + @Test @TestMetadata("checkInnerLocalDeclarations.kt") public void testCheckInnerLocalDeclarations() 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 0c6749e0601..dedd3e2bab8 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 @@ -6204,6 +6204,12 @@ public class LLFirPreresolvedReversedDiagnosticCompilerFE10TestDataTestGenerated runTest("compiler/testData/diagnostics/tests/controlFlowAnalysis/capturingUninitializedVariableInNonInPlaceLambda.kt"); } + @Test + @TestMetadata("cfgOfFullyIncorrectCode.kt") + public void testCfgOfFullyIncorrectCode() throws Exception { + runTest("compiler/testData/diagnostics/tests/controlFlowAnalysis/cfgOfFullyIncorrectCode.kt"); + } + @Test @TestMetadata("checkInnerLocalDeclarations.kt") public void testCheckInnerLocalDeclarations() 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 524f12dbc87..f3c93e688bf 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 @@ -6204,6 +6204,12 @@ public class FirLightTreeOldFrontendDiagnosticsTestGenerated extends AbstractFir runTest("compiler/testData/diagnostics/tests/controlFlowAnalysis/capturingUninitializedVariableInNonInPlaceLambda.kt"); } + @Test + @TestMetadata("cfgOfFullyIncorrectCode.kt") + public void testCfgOfFullyIncorrectCode() throws Exception { + runTest("compiler/testData/diagnostics/tests/controlFlowAnalysis/cfgOfFullyIncorrectCode.kt"); + } + @Test @TestMetadata("checkInnerLocalDeclarations.kt") public void testCheckInnerLocalDeclarations() 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 da2863e0039..a0446c9390b 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 @@ -6210,6 +6210,12 @@ public class FirPsiOldFrontendDiagnosticsTestGenerated extends AbstractFirPsiDia runTest("compiler/testData/diagnostics/tests/controlFlowAnalysis/capturingUninitializedVariableInNonInPlaceLambda.kt"); } + @Test + @TestMetadata("cfgOfFullyIncorrectCode.kt") + public void testCfgOfFullyIncorrectCode() throws Exception { + runTest("compiler/testData/diagnostics/tests/controlFlowAnalysis/cfgOfFullyIncorrectCode.kt"); + } + @Test @TestMetadata("checkInnerLocalDeclarations.kt") public void testCheckInnerLocalDeclarations() throws Exception { diff --git a/compiler/testData/diagnostics/tests/controlFlowAnalysis/cfgOfFullyIncorrectCode.fail b/compiler/testData/diagnostics/tests/controlFlowAnalysis/cfgOfFullyIncorrectCode.fail new file mode 100644 index 00000000000..1e3c3f51773 --- /dev/null +++ b/compiler/testData/diagnostics/tests/controlFlowAnalysis/cfgOfFullyIncorrectCode.fail @@ -0,0 +1 @@ +java.lang.StackOverflowError diff --git a/compiler/testData/diagnostics/tests/controlFlowAnalysis/cfgOfFullyIncorrectCode.fir.kt b/compiler/testData/diagnostics/tests/controlFlowAnalysis/cfgOfFullyIncorrectCode.fir.kt new file mode 100644 index 00000000000..67556913bcb --- /dev/null +++ b/compiler/testData/diagnostics/tests/controlFlowAnalysis/cfgOfFullyIncorrectCode.fir.kt @@ -0,0 +1,20 @@ +// ISSUE: KT-47494 + +{ + + try { + with("",{ { + + + return + + } } + + } + + finally + + + try {} + + finally diff --git a/compiler/testData/diagnostics/tests/controlFlowAnalysis/cfgOfFullyIncorrectCode.kt b/compiler/testData/diagnostics/tests/controlFlowAnalysis/cfgOfFullyIncorrectCode.kt new file mode 100644 index 00000000000..d6981cf760b --- /dev/null +++ b/compiler/testData/diagnostics/tests/controlFlowAnalysis/cfgOfFullyIncorrectCode.kt @@ -0,0 +1,20 @@ +// ISSUE: KT-47494 + +{ + + try { + with("",{ { + + + return + + } } + + } + + finally + + + try {} + + finally 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 1fcab9300f3..82b1fc8a11e 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 @@ -6210,6 +6210,12 @@ public class DiagnosticTestGenerated extends AbstractDiagnosticTest { runTest("compiler/testData/diagnostics/tests/controlFlowAnalysis/capturingUninitializedVariableInNonInPlaceLambda.kt"); } + @Test + @TestMetadata("cfgOfFullyIncorrectCode.kt") + public void testCfgOfFullyIncorrectCode() throws Exception { + runTest("compiler/testData/diagnostics/tests/controlFlowAnalysis/cfgOfFullyIncorrectCode.kt"); + } + @Test @TestMetadata("checkInnerLocalDeclarations.kt") public void testCheckInnerLocalDeclarations() throws Exception {