KT-531 Support nullable iterator in for()

This commit is contained in:
Alex Tkachman
2011-11-18 21:12:25 +02:00
parent 50edc9750b
commit 39ca8eded8
5 changed files with 61 additions and 12 deletions

View File

@@ -12,5 +12,10 @@ fun box() : String {
System.out?.println(sum)
if(sum != 10) return "b failed"
val d : Array<Int?>? = null
for (el in d) {
sum = sum + (el ?: 7)
}
return "OK"
}