Files
kotlin-fork/js/js.translator/testFiles/patternMatching/cases/whenValue.kt
T
Andrey Breslav 1b65ba644e JS Back-end does not handle complex patterns any more
#KT-2359 In Progress
2012-09-05 14:18:40 +04:00

11 lines
143 B
Kotlin

package foo
fun box() : Boolean {
var a = 4
when(a) {
3 -> {a = 10;}
4 -> {a = 20;}
else -> {a = 30;}
}
return (a == 20)
}