Files
kotlin/compiler/testData/codegen/box/controlStructures/forInArrayWithIndex/forInArrayOfObjectArrayWithIndex.kt
Roman Artemev c5922bf74b Refact stdlib generator, add support for different backends
[JS IR BE] Runtime fixes
 * Do not generate external declarations for IR BE
 * Move `arrayToString` helper function out of shared JS stdlib
 * Fix arrays type check for IR BE
2018-11-29 22:04:53 +03:00

12 lines
251 B
Kotlin
Vendored

// WITH_RUNTIME
fun box(): String {
val arr = Array(4) { arrayOf("x$it") }
var s = ""
for ((i, sarr) in arr.withIndex()) {
s += "$i:${sarr.toList()}"
}
return if (s != "0:[x0]1:[x1]2:[x2]3:[x3]") "Fail: '$s'" else "OK"
}