JVM_IR: Specialize iterator if possible

fixes KT-47171
This commit is contained in:
Xin Wang
2022-02-22 17:51:58 +08:00
committed by Alexander Udalov
parent 8bcdc70adc
commit 1b776bd5b6
11 changed files with 230 additions and 7 deletions
@@ -13929,6 +13929,24 @@ public class LightAnalysisModeTestGenerated extends AbstractLightAnalysisModeTes
}
}
@TestMetadata("compiler/testData/codegen/box/forLoop")
@TestDataPath("$PROJECT_ROOT")
@RunWith(JUnit3RunnerWithInners.class)
public static class ForLoop extends AbstractLightAnalysisModeTest {
private void runTest(String testDataFilePath) throws Exception {
KotlinTestUtils.runTest(this::doTest, TargetBackend.JVM, testDataFilePath);
}
public void testAllFilesPresentInForLoop() throws Exception {
KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/codegen/box/forLoop"), Pattern.compile("^(.+)\\.kt$"), null, TargetBackend.JVM, true);
}
@TestMetadata("forInIterator.kt")
public void testForInIterator() throws Exception {
runTest("compiler/testData/codegen/box/forLoop/forInIterator.kt");
}
}
@TestMetadata("compiler/testData/codegen/box/fullJdk")
@TestDataPath("$PROJECT_ROOT")
@RunWith(JUnit3RunnerWithInners.class)