mirror of
https://github.com/jlengrand/kotlin.git
synced 2026-05-09 15:53:37 +00:00
20 lines
379 B
Kotlin
Vendored
20 lines
379 B
Kotlin
Vendored
// IGNORE_BACKEND: JVM_IR
|
|
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
|