maybe this has been discussed already but for the ...
# getting-started
m
maybe this has been discussed already but for the following case:
Copy code
fun foo(items: List<SomeInterface>?) {
    when (items?.firstOrNull()) {
        is Bar -> doBar(items)
        is Buzz -> doBuzz(items)
    }
}
why can't
items
be smart-casted to
List<SomeInterface>
on
doBar
and
doBuzz