Files
kotlin/compiler/testData/codegen/box/controlStructures/forArrayList.kt
2019-11-19 11:00:09 +03:00

13 lines
280 B
Kotlin
Vendored

// IGNORE_BACKEND_FIR: JVM_IR
// KJS_WITH_FULL_RUNTIME
// WITH_RUNTIME
val alist = arrayListOf(1, 2, 3) // : j.u.ArrayList<k.Int>
fun box(): String {
var result = 0
for (i: Int in alist) {
result += i
}
return if (result == 6) "OK" else "fail: $result"
}