mirror of
https://github.com/jlengrand/kotlin.git
synced 2026-05-08 08:31:26 +00:00
28 lines
539 B
Kotlin
28 lines
539 B
Kotlin
import kotlin.test.assertEquals
|
|
|
|
enum class Season {
|
|
WINTER
|
|
SPRING
|
|
SUMMER
|
|
AUTUMN
|
|
}
|
|
|
|
fun bar1(x : Season) : String {
|
|
return when (x) {
|
|
Season.WINTER, Season.SPRING -> "winter_spring"
|
|
Season.SUMMER -> "summer"
|
|
else -> "autumn"
|
|
}
|
|
}
|
|
|
|
fun bar2(x : Season) : String {
|
|
return when (x) {
|
|
Season.WINTER, Season.SPRING -> "winter_spring"
|
|
Season.SUMMER -> "summer"
|
|
Season.AUTUMN -> "autumn"
|
|
}
|
|
}
|
|
|
|
// 2 TABLESWITCH
|
|
// 1 @_DefaultPackage-expression-.*\$WhenMappings\.class
|