1 2 3 4 5 6 7 8 9 10 11 12
interface I { fun foo(): Int } class A fun box() : Int { val o = object : I, A() { override fun foo(): Int = 42 } return o.foo() }