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