Smart casts are fun! ``` val x: Any = Unit if (x i...
# random
m
Smart casts are fun!
Copy code
val x: Any = Unit
if (x is Int && x is String) {
  x.length + x
}
😂 2
t
mg6maciej: wtf
m
I didn't say it makes sense to add this to your codebase, but it compiles just fine (and will never enter if block).
1 + "string"
doesn't compile.
t
mg6maciej: interesting still though