class U interface T { fun U.foofoofoo(b: B): Int } abstract class T1 : T> { override fun U>.foofoofoo(b: B): Int { throw UnsupportedOperationException() } } abstract class T2 : T1() { override fun U>.foofoofoo(b: C): Int { throw UnsupportedOperationException() } }