KT-944 iterations over empty ranges

This commit is contained in:
Alex Tkachman
2012-01-10 09:33:54 +02:00
parent ed58ca219b
commit a0134fb0f2
9 changed files with 43 additions and 1 deletions
@@ -0,0 +1,8 @@
fun box() : String {
for (i in "".indices) {
""[i]
}
return "OK"
}
val String?.indices : IntRange get() = IntRange(0, this.sure().length)