Files
kotlin-fork/compiler/testData/codegen/box/enum/kt20651b.kt
T
Roman Artemev 8a871b3f0c Update tests
2018-08-31 15:34:18 +03:00

17 lines
288 B
Kotlin
Vendored

interface Callback {
fun invoke(): String
}
enum class Foo(
val x: String,
val callback: Callback
) {
FOO(
"OK",
object : Callback {
override fun invoke() = FOO.x
}
)
}
fun box() = Foo.FOO.callback.invoke()