mirror of
https://github.com/jlengrand/kotlin.git
synced 2026-05-11 08:31:30 +00:00
12 lines
226 B
Kotlin
Vendored
12 lines
226 B
Kotlin
Vendored
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"
|