39bd97147f
Usually FIR enum entry is initialized by anonymous object, which is the container for all enum entry' declarations. However, for simple enum entries there is no need of initializer at all.
15 lines
184 B
Kotlin
Vendored
15 lines
184 B
Kotlin
Vendored
package test
|
|
|
|
enum class Season {
|
|
WINTER,
|
|
SPRING,
|
|
SUMMER,
|
|
AUTUMN
|
|
}
|
|
|
|
fun foo(): Season = Season.SPRING
|
|
|
|
fun box() =
|
|
if (foo() == Season.SPRING) "OK"
|
|
else "fail"
|