Files
kotlin/compiler/testData/codegen/boxWithStdlib/callableReference/property/enumNameOrdinal.kt
2015-10-15 00:51:37 +03:00

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"
}