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.
14 lines
200 B
Kotlin
Vendored
14 lines
200 B
Kotlin
Vendored
enum class Bar {
|
|
ONE,
|
|
TWO
|
|
}
|
|
|
|
fun isOne(i: Bar) = i == Bar.ONE
|
|
|
|
fun box(): String {
|
|
return when (isOne(Bar.ONE) && !isOne(Bar.TWO)) {
|
|
true -> "OK"
|
|
else -> "Failure"
|
|
}
|
|
}
|