For-loop range expression (collection) can not be null

This commit is contained in:
Andrey Breslav
2012-08-24 15:36:55 +04:00
parent b315bee7b2
commit 66faa0c03a
24 changed files with 39 additions and 60 deletions
@@ -12,10 +12,5 @@ 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"
}