How come when I do this: ``` val x = (foo as? Foo...
# announcements
b
How come when I do this:
Copy code
val x = (foo as? Foo<Bar>) ?: Foo<Bar>() // foo was declared as foo: FooType, where FooType is a generic constraint of Foo
I get this?
Copy code
Unchecked cast: FooType to Foo<Bar>
Isn’t
as?
checking stuff? Or am I misunderstanding?