arekolek
05/21/2018, 12:47 PMwhy this doesn't compile?
T::class
is of type KClass<T : Foo>
, and that is not a sealed class
Also, if you run:
val par: List<Foo> = listOf(Foo1(), Foo2())
test(par)
Then T
is Foo
so none of the branches in your when
would be executed