Support default case in the non-last position

This commit is contained in:
Jason Turner
2015-10-15 15:02:49 -06:00
parent 64dd349e32
commit 84e2d449b9
3 changed files with 21 additions and 1 deletions

View File

@@ -0,0 +1,18 @@
var total = 0;
switch(2) {
case (1) {
total += 1;
}
default {
total += 16;
}
case (3) {
total += 4;
}
case (4) {
total += 8;
}
}
assert_equal(total, 28)