Files
kotlin/compiler/testData/codegen/box/enum/emptyEnumValuesValueOf.kt
2016-12-15 17:58:40 +03:00

14 lines
261 B
Kotlin
Vendored

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