I have got this setup: ``` sealed class A sealed c...
# announcements
n
I have got this setup:
Copy code
sealed class A
sealed class B : A()

class C : B()
class D : B()

fun test(a: A): Any {
    return when (a) {
        is C -> ""
        is D -> ""
    }
}
Why doesn't the compiler understand the
when
expression is exhaustive? It tells me that I should add a case for
B
. Is this just not implemented yet, or is there more to this? (This is written using the 1.1.0 syntax, but the same happens in 1.0.3)