trait A { val f: Int get() = 3 } trait B : A open class C(b : B) : B by b, A { } class D(b : B) : C(b) { override val f: Int = 2 }