enum class E { FIRST SECOND { default object { fun foo() = 42 } } } fun f() = E.SECOND.foo()