Sign in
pigweed
/
third_party
/
github
/
JetBrains
/
kotlin
/
b7de3709e46eb073303a1e8aac4c22656e4f2863
/
.
/
compiler
/
testData
/
codegen
/
box
/
arrays
/
indices.kt
blob: 9e44beb1124ea17442fab7eb709c11298575679d [
file
]
// WITH_STDLIB
fun box
():
String
{
val a
=
Array
<
Int
>(
5
,
{
it
})
val x
=
a
.
indices
.
iterator
()
while
(
x
.
hasNext
())
{
val i
=
x
.
next
()
if
(
a
[
i
]
!=
i
)
return
"Fail $i ${a[i]}"
}
return
"OK"
}