Files
kotlin/compiler/testData/codegen/box/enum/emptyEnumValuesValueOf.kt
2018-06-09 19:15:38 +03:00

15 lines
286 B
Kotlin
Vendored

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