Files
kotlin/compiler/testData/codegen/box/enum/noClassForSimpleEnum.kt
2018-06-09 19:15:38 +03:00

19 lines
403 B
Kotlin
Vendored

// IGNORE_BACKEND: JS_IR
// TODO: muted automatically, investigate should it be ran for JS or not
// IGNORE_BACKEND: JS, NATIVE
// WITH_RUNTIME
enum class State {
O,
K
}
fun box(): String {
val field = State::class.java.getField("O")
val className = field.get(null).javaClass.name
if (className != "State") return "Fail: $className"
return "${State.O.name}${State.K.name}"
}