Huh. I thought the smart-cast should work in this ...
# announcements
d
Huh. I thought the smart-cast should work in this code:
Copy code
public inline fun <T> Collection<T>?.hasEntries(): Boolean = this != null && !this.isEmpty()
fun foo(ll: MutableList<Int>?)
{
    if (ll.hasEntries()) {
        ll.clear() // ← error here
    }
}