Copy EnumWhenLowering from Kotlin/Native

This commit is contained in:
pyos
2019-05-07 13:53:08 +02:00
committed by Georgy Bronnikov
parent 52315106e8
commit fb194e982e
11 changed files with 117 additions and 9 deletions
@@ -1,4 +1,3 @@
// IGNORE_BACKEND: JVM_IR
import kotlin.test.assertEquals
enum class Season {
@@ -14,6 +13,7 @@ fun box() : String {
return foo(Season.SPRING) {
x -> when (x) {
Season.SPRING -> "OK"
Season.SUMMER -> "fail" // redundant branch to force use of TABLESWITCH instead of IF_ICMPNE
else -> "fail"
}
}