KT-12985 Do not create range instances for 'for' loop in CharSequence.indices

This commit is contained in:
Dmitry Petrov
2016-07-05 16:06:18 +03:00
parent 3dc23a0e02
commit 3445fe0d30
6 changed files with 71 additions and 1 deletions
@@ -909,6 +909,12 @@ public class BytecodeTextTestGenerated extends AbstractBytecodeTextTest {
KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/testData/codegen/bytecodeText/forLoop/forInIndices"), Pattern.compile("^(.+)\\.kt$"), true);
}
@TestMetadata("forInCharSequenceIndices.kt")
public void testForInCharSequenceIndices() throws Exception {
String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/bytecodeText/forLoop/forInIndices/forInCharSequenceIndices.kt");
doTest(fileName);
}
@TestMetadata("forInCollectionImplicitReceiverIndices.kt")
public void testForInCollectionImplicitReceiverIndices() throws Exception {
String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/bytecodeText/forLoop/forInIndices/forInCollectionImplicitReceiverIndices.kt");