fix corner case in join_vars (#3224)

This commit is contained in:
Alex Lam S.L
2018-07-27 19:34:44 +08:00
committed by GitHub
parent 304db15a20
commit d47547dc71
2 changed files with 48 additions and 24 deletions

View File

@@ -1832,3 +1832,33 @@ issue_3188_3: {
}
expect_stdout: "PASS"
}
join_expr: {
options = {
evaluate: true,
join_vars: true,
}
input: {
var c = "FAIL";
(function() {
var a = 0;
switch ((a = {}) && (a.b = 0)) {
case 0:
c = "PASS";
}
})();
console.log(c);
}
expect: {
var c = "FAIL";
(function() {
var a = 0;
switch (a = { b: 0 }, a.b) {
case 0:
c = "PASS";
}
})();
console.log(c);
}
expect_stdout: "PASS"
}