open class A open class B : A() open class First { open fun test(item: T) {} } open class Second : First() { override fun test(item: A) {} }