KT-36047 Support when-with-subject in optimized 'when' generators
This commit is contained in:
@@ -0,0 +1,12 @@
|
||||
fun foo(x: String): String {
|
||||
return when (val y = x) {
|
||||
"1" -> "one"
|
||||
"2" -> "two"
|
||||
"3" -> "two and one"
|
||||
"4" -> "two and two"
|
||||
else -> "many"
|
||||
}
|
||||
}
|
||||
|
||||
// 0 LOOKUPSWITCH
|
||||
// 1 TABLESWITCH
|
||||
Reference in New Issue
Block a user