why doesn't smart-cast work on the following scena...
# announcements
m
why doesn't smart-cast work on the following scenario
Copy code
data class Foo(val bar: Int?, val fizz: Int?) {
     val myVal get() = bar.takeIf { fizz != null }
}
________
val myFoo = Foo(1, 2)
val myBool = myFoo.myVal != null && myFoo.myVal > 5  <--- '>' cannot be applied to the types involved