open class A { fun foo(t: T): T { return t } } class Some class B : A() { fun test() { foo(Some()) } }