Sign in
pigweed
/
third_party
/
github
/
JetBrains
/
kotlin
/
073a50037049a4e0869085bf4acf7c29e56210e3
/
.
/
compiler
/
testData
/
codegen
/
box
/
arrays
/
indices.kt
blob: 92dbbc7969e3abc3c8368653dd359b73d4470a64 [
file
] [
log
] [
blame
]
// KJS_WITH_FULL_RUNTIME
// WITH_RUNTIME
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"
}