For-loop range expression (collection) can not be null
This commit is contained in:
@@ -17,7 +17,7 @@ fun <T> fff(x: T) : T { return x }
|
||||
|
||||
fun <T> id(value: T): T = value
|
||||
|
||||
fun foreach(array: Array<Int>?, action: (Int)-> Unit) {
|
||||
fun foreach(array: Array<Int>, action: (Int)-> Unit) {
|
||||
for (el in array) {
|
||||
action(el) //exception through compilation (see below)
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user