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
@@ -17266,6 +17266,22 @@ public class FirBlackBoxCodegenTestGenerated extends AbstractFirBlackBoxCodegenT
}
}
@Nested
@TestMetadata("compiler/testData/codegen/box/forLoop")
@TestDataPath("$PROJECT_ROOT")
public class ForLoop {
@Test
public void testAllFilesPresentInForLoop() throws Exception {
KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/codegen/box/forLoop"), Pattern.compile("^(.+)\\.kt$"), null, TargetBackend.JVM_IR, true);
}
@Test
@TestMetadata("forInIterator.kt")
public void testForInIterator() throws Exception {
runTest("compiler/testData/codegen/box/forLoop/forInIterator.kt");
}
}
@Nested
@TestMetadata("compiler/testData/codegen/box/fullJdk")
@TestDataPath("$PROJECT_ROOT")