improve switch case compression (#2547)

This commit is contained in:
Alex Lam S.L
2017-12-01 14:32:00 +08:00
committed by GitHub
parent f6610baaa8
commit 7ac6fdcc99
3 changed files with 42 additions and 9 deletions

View File

@@ -7,7 +7,7 @@ case_1: {
input: {
var a = 0, b = 1;
switch (true) {
case a, true:
case a || true:
default:
b = 2;
case true:
@@ -17,7 +17,7 @@ case_1: {
expect: {
var a = 0, b = 1;
switch (true) {
case a, true:
case a || true:
b = 2;
}
console.log(a, b);