menegatti
02/15/2017, 9:59 AMfun 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