mirror of
https://github.com/jlengrand/kotlin.git
synced 2026-05-18 00:21:35 +00:00
Handle withIndex() on Iterables (including progressions) and Sequences
in ForLoopsLowering.
This commit is contained in:
committed by
max-kammerer
parent
a54d9482dd
commit
7adffe0007
@@ -1,4 +1,3 @@
|
||||
// IGNORE_BACKEND: JVM_IR
|
||||
val xs = listOf<Any>()
|
||||
|
||||
fun box(): String {
|
||||
@@ -15,3 +14,6 @@ fun box(): String {
|
||||
// 1 next
|
||||
// 0 component1
|
||||
// 0 component2
|
||||
|
||||
// The 1st ICONST_0 is for initializing the list. 2nd is for initializing the index in the lowered for-loop.
|
||||
// 2 ICONST_0
|
||||
|
||||
@@ -1,4 +1,3 @@
|
||||
// IGNORE_BACKEND: JVM_IR
|
||||
val xs = listOf("a", "b", "c", "d")
|
||||
|
||||
fun box(): String {
|
||||
@@ -18,3 +17,6 @@ fun box(): String {
|
||||
// 1 next
|
||||
// 0 component1
|
||||
// 0 component2
|
||||
|
||||
// The 1st ICONST_0 is for initializing the list. 2nd is for initializing the index in the lowered for-loop.
|
||||
// 2 ICONST_0
|
||||
|
||||
@@ -1,4 +1,3 @@
|
||||
// IGNORE_BACKEND: JVM_IR
|
||||
val xs = listOf("a", "b", "c", "d")
|
||||
|
||||
fun box(): String {
|
||||
@@ -18,3 +17,6 @@ fun box(): String {
|
||||
// 1 next
|
||||
// 0 component1
|
||||
// 0 component2
|
||||
|
||||
// The 1st ICONST_0 is for initializing the list. 2nd is for initializing the index in the lowered for-loop.
|
||||
// 2 ICONST_0
|
||||
|
||||
@@ -1,4 +1,3 @@
|
||||
// IGNORE_BACKEND: JVM_IR
|
||||
val xs = listOf("a", "b", "c", "d")
|
||||
|
||||
fun box(): String {
|
||||
@@ -18,3 +17,6 @@ fun box(): String {
|
||||
// 1 next
|
||||
// 0 component1
|
||||
// 0 component2
|
||||
|
||||
// The 1st ICONST_0 is for initializing the list. 2nd is for initializing the index in the lowered for-loop.
|
||||
// 2 ICONST_0
|
||||
|
||||
@@ -1,4 +1,3 @@
|
||||
// IGNORE_BACKEND: JVM_IR
|
||||
val xs = listOf("a", "b", "c", "d")
|
||||
|
||||
fun useAny(x: Any) {}
|
||||
@@ -21,3 +20,6 @@ fun box(): String {
|
||||
// 1 next
|
||||
// 0 component1
|
||||
// 0 component2
|
||||
|
||||
// The 1st ICONST_0 is for initializing the list. 2nd is for initializing the index in the lowered for-loop.
|
||||
// 2 ICONST_0
|
||||
|
||||
Reference in New Issue
Block a user