mirror of
https://github.com/jlengrand/kotlin.git
synced 2026-05-09 15:53:37 +00:00
12 lines
225 B
Kotlin
12 lines
225 B
Kotlin
enum class Color {
|
|
RED
|
|
BLUE
|
|
}
|
|
|
|
fun box() = if(
|
|
Color.valueOf("RED") == Color.RED
|
|
&& Color.valueOf("BLUE") == Color.BLUE
|
|
&& Color.values()[0] == Color.RED
|
|
&& Color.values()[1] == Color.BLUE
|
|
) "OK" else "fail"
|