Files
kotlin/compiler/testData/codegen/box/enum/emptyEnumValuesValueOf.kt
2019-11-19 11:00:09 +03:00

15 lines
291 B
Kotlin
Vendored

// IGNORE_BACKEND_FIR: JVM_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"
}
}