ForLoopsLowering: Fix issue with break/continue in loop over withIndex.

This commit is contained in:
Mark Punzalan
2020-01-29 16:24:28 -08:00
committed by max-kammerer
parent 724eda8fdb
commit 3ee344b836
12 changed files with 265 additions and 27 deletions
@@ -5414,6 +5414,11 @@ public class BlackBoxCodegenTestGenerated extends AbstractBlackBoxCodegenTest {
runTest("compiler/testData/codegen/box/controlStructures/forInArrayWithIndex/forInArrayOfPrimArrayWithIndex.kt");
}
@TestMetadata("forInArrayWithIndexBreakAndContinue.kt")
public void testForInArrayWithIndexBreakAndContinue() throws Exception {
runTest("compiler/testData/codegen/box/controlStructures/forInArrayWithIndex/forInArrayWithIndexBreakAndContinue.kt");
}
@TestMetadata("forInArrayWithIndexContinuesAsUnmodified.kt")
public void testForInArrayWithIndexContinuesAsUnmodified() throws Exception {
runTest("compiler/testData/codegen/box/controlStructures/forInArrayWithIndex/forInArrayWithIndexContinuesAsUnmodified.kt");
@@ -5527,6 +5532,11 @@ public class BlackBoxCodegenTestGenerated extends AbstractBlackBoxCodegenTest {
runTest("compiler/testData/codegen/box/controlStructures/forInCharSequenceWithIndex/forInCharSequenceWithIndex.kt");
}
@TestMetadata("forInCharSequenceWithIndexBreakAndContinue.kt")
public void testForInCharSequenceWithIndexBreakAndContinue() throws Exception {
runTest("compiler/testData/codegen/box/controlStructures/forInCharSequenceWithIndex/forInCharSequenceWithIndexBreakAndContinue.kt");
}
@TestMetadata("forInCharSequenceWithIndexCheckSideEffects.kt")
public void testForInCharSequenceWithIndexCheckSideEffects() throws Exception {
runTest("compiler/testData/codegen/box/controlStructures/forInCharSequenceWithIndex/forInCharSequenceWithIndexCheckSideEffects.kt");
@@ -5620,6 +5630,11 @@ public class BlackBoxCodegenTestGenerated extends AbstractBlackBoxCodegenTest {
runTest("compiler/testData/codegen/box/controlStructures/forInIterableWithIndex/forInListWithIndex.kt");
}
@TestMetadata("forInListWithIndexBreakAndContinue.kt")
public void testForInListWithIndexBreakAndContinue() throws Exception {
runTest("compiler/testData/codegen/box/controlStructures/forInIterableWithIndex/forInListWithIndexBreakAndContinue.kt");
}
@TestMetadata("forInListWithIndexNoElementVar.kt")
public void testForInListWithIndexNoElementVar() throws Exception {
runTest("compiler/testData/codegen/box/controlStructures/forInIterableWithIndex/forInListWithIndexNoElementVar.kt");
@@ -5668,6 +5683,11 @@ public class BlackBoxCodegenTestGenerated extends AbstractBlackBoxCodegenTest {
runTest("compiler/testData/codegen/box/controlStructures/forInSequenceWithIndex/forInSequenceWithIndex.kt");
}
@TestMetadata("forInSequenceWithIndexBreakAndContinue.kt")
public void testForInSequenceWithIndexBreakAndContinue() throws Exception {
runTest("compiler/testData/codegen/box/controlStructures/forInSequenceWithIndex/forInSequenceWithIndexBreakAndContinue.kt");
}
@TestMetadata("forInSequenceWithIndexCheckSideEffects.kt")
public void testForInSequenceWithIndexCheckSideEffects() throws Exception {
runTest("compiler/testData/codegen/box/controlStructures/forInSequenceWithIndex/forInSequenceWithIndexCheckSideEffects.kt");
@@ -20919,6 +20939,11 @@ public class BlackBoxCodegenTestGenerated extends AbstractBlackBoxCodegenTest {
runTest("compiler/testData/codegen/box/ranges/forInProgressionWithIndex/forInUntilWithIndex.kt");
}
@TestMetadata("forInWithIndexBreakAndContinue.kt")
public void testForInWithIndexBreakAndContinue() throws Exception {
runTest("compiler/testData/codegen/box/ranges/forInProgressionWithIndex/forInWithIndexBreakAndContinue.kt");
}
@TestMetadata("forInWithIndexNoIndexOrElementVar.kt")
public void testForInWithIndexNoIndexOrElementVar() throws Exception {
runTest("compiler/testData/codegen/box/ranges/forInProgressionWithIndex/forInWithIndexNoIndexOrElementVar.kt");