trait A { fun f() { } } trait B : A open class C(b : B) : B by b, A { } class D(b : B) : C(b) { override fun f() {} }