Handle withIndex() on arrays and CharSequences in ForLoopsLowering.
This commit is contained in:
committed by
max-kammerer
parent
735535dd5a
commit
a54d9482dd
+3
-1
@@ -1,4 +1,3 @@
|
||||
// IGNORE_BACKEND: JVM_IR
|
||||
val arr = arrayOf("a", "b", "c", "d")
|
||||
|
||||
fun box(): String {
|
||||
@@ -19,3 +18,6 @@ fun box(): String {
|
||||
// 0 component1
|
||||
// 0 component2
|
||||
// 1 ARRAYLENGTH
|
||||
|
||||
// The 1st ICONST_0 is for initializing the array. 2nd is for initializing the index in the lowered for-loop.
|
||||
// 2 ICONST_0
|
||||
|
||||
Vendored
+3
-1
@@ -1,4 +1,3 @@
|
||||
// IGNORE_BACKEND: JVM_IR
|
||||
val arr = arrayOf("a", "b", "c", "d")
|
||||
|
||||
fun box(): String {
|
||||
@@ -19,3 +18,6 @@ fun box(): String {
|
||||
// 0 component1
|
||||
// 0 component2
|
||||
// 1 ARRAYLENGTH
|
||||
|
||||
// The 1st ICONST_0 is for initializing the array. 2nd is for initializing the index in the lowered for-loop.
|
||||
// 2 ICONST_0
|
||||
|
||||
Vendored
+3
-1
@@ -1,4 +1,3 @@
|
||||
// IGNORE_BACKEND: JVM_IR
|
||||
val arr = intArrayOf()
|
||||
|
||||
fun box(): String {
|
||||
@@ -16,3 +15,6 @@ fun box(): String {
|
||||
// 0 component1
|
||||
// 0 component2
|
||||
// 1 ARRAYLENGTH
|
||||
|
||||
// The 1st ICONST_0 is for initializing the array. 2nd is for initializing the index in the lowered for-loop.
|
||||
// 2 ICONST_0
|
||||
|
||||
Vendored
+3
-1
@@ -1,4 +1,3 @@
|
||||
// IGNORE_BACKEND: JVM_IR
|
||||
val arr = intArrayOf(10, 20, 30, 40)
|
||||
|
||||
fun box(): String {
|
||||
@@ -17,3 +16,6 @@ fun box(): String {
|
||||
// 0 component1
|
||||
// 0 component2
|
||||
// 1 ARRAYLENGTH
|
||||
|
||||
// The 1st ICONST_0 is for initializing the array. 2nd is for initializing the index in the lowered for-loop.
|
||||
// 2 ICONST_0
|
||||
|
||||
Vendored
+3
-1
@@ -1,4 +1,3 @@
|
||||
// IGNORE_BACKEND: JVM_IR
|
||||
val arr = arrayOf("a", "b", "c", "d")
|
||||
|
||||
fun box(): String {
|
||||
@@ -19,3 +18,6 @@ fun box(): String {
|
||||
// 0 component1
|
||||
// 0 component2
|
||||
// 1 ARRAYLENGTH
|
||||
|
||||
// The 1st ICONST_0 is for initializing the array. 2nd is for initializing the index in the lowered for-loop.
|
||||
// 2 ICONST_0
|
||||
|
||||
Reference in New Issue
Block a user