open class Z { open fun test(p: T, z: Y): T { return p } } open class ZImpl : Z() open class ZImpl2 : ZImpl() class ZImpl3 : ZImpl2() { override fun test(p: String, z: String): String { return super.test(p, z) } } fun box(): String { return ZImpl3().test("OK", "fail") }