https://kotlinlang.org logo
o

orangy

06/09/2016, 10:21 PM
@simtse: because val is open, smart-casts don’t work. It is because override can choose to return different values for subsequent calls. And
iterator
is not defined on a nullable list. Extract
boxes
into local variable and use it to smart-cast.