Minor in JS backend: added missed test case -- when inside when w/o braces.

This commit is contained in:
Zalim Bashorov
2014-06-18 23:18:23 +04:00
parent 209315baad
commit 865880f196
2 changed files with 27 additions and 1 deletions
@@ -105,4 +105,8 @@ public final class PatternMatchingTest extends SingleFileTranslationTest {
public void testIfWithOneStmWhen() throws Exception {
fooBoxTest();
}
}
public void testWhenWithOneStmWhen() throws Exception {
fooBoxTest();
}
}
@@ -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;
}