Files
kotlin-fork/backend.native/tests/external/codegen/box/enum/emptyEnumValuesValueOf.kt
T
2017-03-13 15:31:46 +03:00

14 lines
261 B
Kotlin

enum class Empty
fun box(): String {
if (Empty.values().size != 0) return "Fail: ${Empty.values()}"
try {
val found = Empty.valueOf("nonExistentEntry")
return "Fail: $found"
}
catch (e: Exception) {
return "OK"
}
}