ForLoopsLowering: Handle Sequence<*>.withIndex().

This commit is contained in:
Mark Punzalan
2020-07-21 22:33:53 -07:00
committed by Alexander Udalov
parent 132960a695
commit 174576af61
11 changed files with 47 additions and 32 deletions
@@ -1,6 +1,3 @@
// IGNORE_BACKEND: JVM_IR
// TODO KT-36774 Generate optimized loops over 'xs.withIndex()' in JVM_IR
// TODO: Handle Sequences by extending DefaultIterableHandler.
val xs = listOf<Any>().asSequence()
fun box(): String {
@@ -1,6 +1,3 @@
// IGNORE_BACKEND: JVM_IR
// TODO KT-36774 Generate optimized loops over 'xs.withIndex()' in JVM_IR
// TODO: Handle Sequences by extending DefaultIterableHandler.
fun <T : Sequence<*>> test(sequence: T): String {
val s = StringBuilder()
@@ -1,6 +1,3 @@
// IGNORE_BACKEND: JVM_IR
// TODO KT-36774 Generate optimized loops over 'xs.withIndex()' in JVM_IR
// TODO: Handle Sequences by extending DefaultIterableHandler.
val xs = listOf("a", "b", "c", "d").asSequence()
fun box(): String {
@@ -1,6 +1,3 @@
// IGNORE_BACKEND: JVM_IR
// TODO KT-36774 Generate optimized loops over 'xs.withIndex()' in JVM_IR
// TODO: Handle Sequences by extending DefaultIterableHandler.
val xs = listOf("a", "b", "c", "d").asSequence()
fun box(): String {
@@ -1,6 +1,3 @@
// IGNORE_BACKEND: JVM_IR
// TODO KT-36774 Generate optimized loops over 'xs.withIndex()' in JVM_IR
// TODO: Handle Sequences by extending DefaultIterableHandler.
val xs = listOf("a", "b", "c", "d").asSequence()
fun box(): String {
@@ -1,6 +1,3 @@
// IGNORE_BACKEND: JVM_IR
// TODO KT-36774 Generate optimized loops over 'xs.withIndex()' in JVM_IR
// TODO: Handle Sequences by extending DefaultIterableHandler.
// FULL_JDK
val xsl = arrayListOf("a", "b", "c", "d")
@@ -1,6 +1,3 @@
// IGNORE_BACKEND: JVM_IR
// TODO KT-36774 Generate optimized loops over 'xs.withIndex()' in JVM_IR
// TODO: Handle Sequences by extending DefaultIterableHandler.
val xs = listOf("a", "b", "c", "d").asSequence()
fun useAny(x: Any) {}