Files
kotlin-fork/compiler/testData/codegen/enum/ordinal.kt
T
2012-08-13 22:37:27 +03:00

9 lines
180 B
Kotlin

enum class State {
_0
_1
_2
_3
}
fun box() = if(State._0.ordinal()==0 && State._1.ordinal() == 1 && State._2.ordinal() == 2 && State._3.ordinal() == 3) "OK" else "fail"