Files
kotlin/compiler/testData/codegen/box/arrays/iteratorByteArrayNextByte.kt
2018-09-18 14:36:20 +03:00

11 lines
197 B
Kotlin
Vendored

fun box(): String {
val a = ByteArray(5)
val x = a.iterator()
var i = 0
while (x.hasNext()) {
if (a[i] != x.nextByte()) return "Fail $i"
i++
}
return "OK"
}