mirror of
https://github.com/jlengrand/kotlin.git
synced 2026-05-08 15:53:19 +00:00
12 lines
195 B
Kotlin
Vendored
12 lines
195 B
Kotlin
Vendored
enum class E {
|
|
I
|
|
}
|
|
|
|
fun box(): String {
|
|
val i = (E::name).get(E.I)
|
|
if (i != "I") return "Fail $i"
|
|
val n = (E::ordinal).get(E.I)
|
|
if (n != 0) return "Fail $n"
|
|
return "OK"
|
|
}
|