[Test] Add test for KT-47494

This commit is contained in:
Dmitriy Novozhilov
2023-07-03 13:25:02 +03:00
committed by Space Team
parent 03973419dd
commit 2ad441f6c8
8 changed files with 71 additions and 0 deletions
@@ -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 {
@@ -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 {
@@ -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 {
@@ -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 {
@@ -0,0 +1 @@
java.lang.StackOverflowError
@@ -0,0 +1,20 @@
// ISSUE: KT-47494
<!SYNTAX!><!>{
try {
with("",{ {
<!RETURN_NOT_ALLOWED!>return<!>
} }<!SYNTAX!><!>
}
finally
<!SYNTAX!><!>try {}
finally<!SYNTAX!><!>
@@ -0,0 +1,20 @@
// ISSUE: KT-47494
{
try {
with("",{ {
return
} }
}
finally
try {}
finally
@@ -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 {