mirror of
https://github.com/jlengrand/kotlin.git
synced 2026-05-09 08:31:29 +00:00
13 lines
255 B
Kotlin
Vendored
13 lines
255 B
Kotlin
Vendored
// IGNORE_BACKEND: JS_IR
|
|
// WITH_RUNTIME
|
|
val alist = arrayListOf(1 to 2, 2 to 3, 3 to 4)
|
|
|
|
fun box(): String {
|
|
var result = 0
|
|
for ((i: Int, z: Int) in alist) {
|
|
|
|
result += i + z
|
|
}
|
|
|
|
return if (result == 15) "OK" else "fail: $result"
|
|
} |