[Test] Add test for KT-47892

This commit is contained in:
Dmitriy Novozhilov
2023-07-03 13:18:10 +03:00
committed by Space Team
parent 637b46cb6e
commit 03973419dd
7 changed files with 54 additions and 0 deletions
@@ -7090,6 +7090,12 @@ public class DiagnosticCompilerTestFE10TestdataTestGenerated extends AbstractDia
runTest("compiler/testData/diagnostics/tests/controlStructures/continueAndBreakLabelWithSameFunctionName.kt");
}
@Test
@TestMetadata("continueInInitBlock.kt")
public void testContinueInInitBlock() throws Exception {
runTest("compiler/testData/diagnostics/tests/controlStructures/continueInInitBlock.kt");
}
@Test
@TestMetadata("emptyIf.kt")
public void testEmptyIf() throws Exception {
@@ -7090,6 +7090,12 @@ public class LLFirPreresolvedReversedDiagnosticCompilerFE10TestDataTestGenerated
runTest("compiler/testData/diagnostics/tests/controlStructures/continueAndBreakLabelWithSameFunctionName.kt");
}
@Test
@TestMetadata("continueInInitBlock.kt")
public void testContinueInInitBlock() throws Exception {
runTest("compiler/testData/diagnostics/tests/controlStructures/continueInInitBlock.kt");
}
@Test
@TestMetadata("emptyIf.kt")
public void testEmptyIf() throws Exception {
@@ -7090,6 +7090,12 @@ public class FirLightTreeOldFrontendDiagnosticsTestGenerated extends AbstractFir
runTest("compiler/testData/diagnostics/tests/controlStructures/continueAndBreakLabelWithSameFunctionName.kt");
}
@Test
@TestMetadata("continueInInitBlock.kt")
public void testContinueInInitBlock() throws Exception {
runTest("compiler/testData/diagnostics/tests/controlStructures/continueInInitBlock.kt");
}
@Test
@TestMetadata("emptyIf.kt")
public void testEmptyIf() throws Exception {
@@ -7096,6 +7096,12 @@ public class FirPsiOldFrontendDiagnosticsTestGenerated extends AbstractFirPsiDia
runTest("compiler/testData/diagnostics/tests/controlStructures/continueAndBreakLabelWithSameFunctionName.kt");
}
@Test
@TestMetadata("continueInInitBlock.kt")
public void testContinueInInitBlock() throws Exception {
runTest("compiler/testData/diagnostics/tests/controlStructures/continueInInitBlock.kt");
}
@Test
@TestMetadata("emptyIf.kt")
public void testEmptyIf() throws Exception {
@@ -0,0 +1,12 @@
// ISSUE: KT-47892
fun test(b: Boolean) {
while (b) {
class A {
init {
<!BREAK_OR_CONTINUE_JUMPS_ACROSS_FUNCTION_BOUNDARY!>continue<!>
}
constructor(): super()
}
}
}
@@ -0,0 +1,12 @@
// ISSUE: KT-47892
fun test(b: Boolean) {
while (b) {
class A {
init {
continue
}
constructor(): super()
}
}
}
@@ -7096,6 +7096,12 @@ public class DiagnosticTestGenerated extends AbstractDiagnosticTest {
runTest("compiler/testData/diagnostics/tests/controlStructures/continueAndBreakLabelWithSameFunctionName.kt");
}
@Test
@TestMetadata("continueInInitBlock.kt")
public void testContinueInInitBlock() throws Exception {
runTest("compiler/testData/diagnostics/tests/controlStructures/continueInInitBlock.kt");
}
@Test
@TestMetadata("emptyIf.kt")
public void testEmptyIf() throws Exception {