mirror of
https://github.com/jlengrand/kotlin.git
synced 2026-05-16 15:53:55 +00:00
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"
|
|
}
|
|
}
|