Files
kotlin/compiler/testData/codegen/bytecodeText/whenEnumOptimization/subjectAny.kt
2015-08-10 16:24:12 +03:00

19 lines
290 B
Kotlin
Vendored

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