backend: fix minor bug in evaluateWhen

Also add the corresponding test 'when9'.
This commit is contained in:
Svyatoslav Scherbina
2017-01-20 18:40:24 +07:00
committed by SvyatoslavScherbina
parent 0958d32605
commit 1f7738e052
3 changed files with 22 additions and 2 deletions
@@ -0,0 +1,10 @@
fun main(args: Array<String>) {
foo(0)
println("Ok")
}
fun foo(x: Int) {
when (x) {
0 -> 0
}
}