mirror of
https://github.com/jlengrand/kotlin.git
synced 2026-05-08 15:53:19 +00:00
14 lines
330 B
Kotlin
Vendored
14 lines
330 B
Kotlin
Vendored
// IGNORE_BACKEND_FIR: JVM_IR
|
|
// KJS_WITH_FULL_RUNTIME
|
|
// WITH_RUNTIME
|
|
|
|
val arr = arrayOf(10, 20, 30, 40)
|
|
|
|
fun box(): String {
|
|
val s = StringBuilder()
|
|
for ((index, x) in arr.withIndex()) {
|
|
s.append("$index:$x;")
|
|
}
|
|
val ss = s.toString()
|
|
return if (ss == "0:10;1:20;2:30;3:40;") "OK" else "fail: '$ss'"
|
|
} |