open class A { } trait Z { fun foo() } class B: A, Z { override fun foo() { } }