mirror of
https://github.com/jlengrand/kotlin.git
synced 2026-05-10 15:53:46 +00:00
15 lines
274 B
Kotlin
Vendored
15 lines
274 B
Kotlin
Vendored
// 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}"
|
|
}
|