ForLoopsLowering: Handle Iterable.withIndex() where the type is a

bounded type parameter.

TODO: Handle Sequences by extending DefaultIterableHandler.
This commit is contained in:
Mark Punzalan
2019-11-26 23:19:00 -08:00
committed by max-kammerer
parent e8252ea874
commit 1a2e09e6a5
20 changed files with 231 additions and 12 deletions
@@ -1986,6 +1986,11 @@ public class BytecodeTextTestGenerated extends AbstractBytecodeTextTest {
runTest("compiler/testData/codegen/bytecodeText/forLoop/forInIterableWithIndex/forInEmptyListWithIndex.kt");
}
@TestMetadata("forInIterableTypeParameterWithIndex.kt")
public void testForInIterableTypeParameterWithIndex() throws Exception {
runTest("compiler/testData/codegen/bytecodeText/forLoop/forInIterableWithIndex/forInIterableTypeParameterWithIndex.kt");
}
@TestMetadata("forInListWithIndex.kt")
public void testForInListWithIndex() throws Exception {
runTest("compiler/testData/codegen/bytecodeText/forLoop/forInIterableWithIndex/forInListWithIndex.kt");
@@ -2175,6 +2180,11 @@ public class BytecodeTextTestGenerated extends AbstractBytecodeTextTest {
runTest("compiler/testData/codegen/bytecodeText/forLoop/forInSequenceWithIndex/forInEmptySequenceWithIndex.kt");
}
@TestMetadata("forInSequenceTypeParameterWithIndex.kt")
public void testForInSequenceTypeParameterWithIndex() throws Exception {
runTest("compiler/testData/codegen/bytecodeText/forLoop/forInSequenceWithIndex/forInSequenceTypeParameterWithIndex.kt");
}
@TestMetadata("forInSequenceWithIndex.kt")
public void testForInSequenceWithIndex() throws Exception {
runTest("compiler/testData/codegen/bytecodeText/forLoop/forInSequenceWithIndex/forInSequenceWithIndex.kt");