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

14 lines
195 B
Kotlin
Vendored

// IGNORE_BACKEND: JS_IR
enum class Season {
WINTER,
SPRING,
SUMMER,
AUTUMN
}
fun foo(): Season = Season.SPRING
fun box() =
if (foo() == Season.SPRING) "OK"
else "fail"