mirror of
https://github.com/jlengrand/kotlin.git
synced 2026-05-08 15:53:19 +00:00
19 lines
353 B
Kotlin
Vendored
19 lines
353 B
Kotlin
Vendored
fun foo1(x : String?) : String {
|
|
when (x) {
|
|
"abc", "cde" -> return "abc_cde"
|
|
"efg", "ghi", null -> return "efg_ghi"
|
|
}
|
|
|
|
return "other"
|
|
}
|
|
|
|
fun foo2(x : String?) : String {
|
|
when (x) {
|
|
"abc", "cde" -> return "abc_cde"
|
|
"efg", "ghi" -> return "efg_ghi"
|
|
else -> return "other"
|
|
}
|
|
}
|
|
|
|
// 2 LOOKUPSWITCH
|