trait B trait G: B fun f(p: B<Foo>): Any { val v = p as G return v: G<*> }