Files
kotlin-fork/js/js.translator/testFiles/patternMatching/cases/whenValue.kt
T
2012-02-27 21:55:58 +04:00

11 lines
149 B
Kotlin

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