Files
kotlin-fork/js/js.translator/testData/standardClasses/cases/arraysIterator.kt
T
2015-04-07 13:08:53 +03:00

11 lines
283 B
Kotlin
Vendored

package foo
val a1 = Array<Int>(3, { i: Int -> i })
fun box(): Boolean {
val i = a1.iterator()
return ((i.hasNext() == true) && (i.next() == 0) &&
(i.hasNext() == true) && (i.next() == 1) &&
(i.hasNext() == true) && (i.next() == 2) &&
(i.hasNext() == false));
}