I know the reason due to which I'm able to write t...
# compiler
s
I know the reason due to which I'm able to write this without any issues. But should I be able to do that with strict type checking?
e
null
inhabits all
T?
, and value is smart-cast to null. why shouldn't you be able to?
p
Yep. In line 7 the compiler knows it's null. And setInt accepts nulls.