05ff2b1292
FIR translates:
```
when (x) {
1, 2, 3 -> action
else -> other_action
}
```
to an IR structure with nested ors:
```
if ((x == 1 || x == 2) || (x == 3)) action
else other_action
```
This change allows that to turn into switch instructions in the
JVM backend.
10 lines
172 B
Kotlin
Vendored
10 lines
172 B
Kotlin
Vendored
fun foo(x : String) : String {
|
|
return when (x) {
|
|
"abc", "cde" -> "abc_cde"
|
|
"efg", "ghi" -> "efg_ghi"
|
|
else -> "other"
|
|
}
|
|
}
|
|
|
|
// 1 LOOKUPSWITCH
|