JS backend: move patternMatching tests to expression/when
This commit is contained in:
@@ -0,0 +1,22 @@
|
||||
package foo
|
||||
|
||||
|
||||
fun box(): Boolean {
|
||||
var result = false
|
||||
val i = 1
|
||||
when (i) {
|
||||
1 ->
|
||||
when (i) {
|
||||
1 -> result = true
|
||||
else -> result = false
|
||||
}
|
||||
|
||||
else ->
|
||||
when (i) {
|
||||
1 -> result = true
|
||||
else -> result = false
|
||||
}
|
||||
}
|
||||
|
||||
return result;
|
||||
}
|
||||
Reference in New Issue
Block a user