Files
kotlin-fork/compiler/testData/codegen/box/enum/emptyEnumValuesValueOf.kt
T
2021-09-08 19:56:38 +03:00

15 lines
262 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"
}
}