IntRange iteration calls correct methods on IntRange class

This commit is contained in:
Dmitry Jemerov
2011-10-19 20:29:55 +02:00
parent bfbc7ad601
commit c26ab4b472
4 changed files with 20 additions and 5 deletions
@@ -0,0 +1,13 @@
fun box() : String {
val a = Array<String?>(3)
a[0] = "a"
a[1] = "b"
a[2] = "c"
val result = 0
for(i in a.indices) {
result += i
}
if (result != 3) return "FAIL"
return "OK"
}