<@U0HDE11NW>: and <@U0B8ZP13Q> about null checkin...
# announcements
a
@rokee: and @cedric about null checking, smart casts and
val
vs.
var
… it is more complicated than that.
var
can work if local and is captured by expression. See all cases here http://stackoverflow.com/a/34498563/3679676 under "More about null Checking and Smart Casts” From beta 1 announcement there was a recent change (http://blog.jetbrains.com/kotlin/2015/10/kotlin-1-0-beta-candidate-is-out/)
Smart casts now work even on local var‘s that are captured in lambdas, if they are not mutated in those lambdas: