Files
kotlin/compiler/testData/codegen/box/callableReference/property/enumNameOrdinal.kt
2018-07-23 15:08:18 +03:00

13 lines
221 B
Kotlin
Vendored

// IGNORE_BACKEND: JVM_IR
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"
}