mirror of
https://github.com/jlengrand/kotlin.git
synced 2026-05-09 08:31:29 +00:00
19 lines
287 B
Kotlin
19 lines
287 B
Kotlin
enum class Season {
|
|
WINTER
|
|
SPRING
|
|
SUMMER
|
|
AUTUMN
|
|
}
|
|
|
|
fun foo(x : Any) : String {
|
|
return when (x) {
|
|
Season.WINTER -> "winter"
|
|
Season.SPRING -> "spring"
|
|
Season.SUMMER -> "summer"
|
|
else -> "other"
|
|
}
|
|
}
|
|
|
|
// 0 TABLESWITCH
|
|
// 0 LOOKUPSWITCH
|