@@ -2498,7 +2498,7 @@ Compressor.prototype.compress = function(node) {
|
|||||||
hit_index++;
|
hit_index++;
|
||||||
}
|
}
|
||||||
branch.expression = branch.expression.transform(tt);
|
branch.expression = branch.expression.transform(tt);
|
||||||
if (!replace_all) break;
|
if (!replace_all || verify_ref) break;
|
||||||
scan_rhs = false;
|
scan_rhs = false;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -10121,3 +10121,30 @@ issue_5643: {
|
|||||||
}
|
}
|
||||||
expect_stdout: "42"
|
expect_stdout: "42"
|
||||||
}
|
}
|
||||||
|
|
||||||
|
issue_5719: {
|
||||||
|
options = {
|
||||||
|
collapse_vars: true,
|
||||||
|
reduce_vars: true,
|
||||||
|
toplevel: true,
|
||||||
|
}
|
||||||
|
input: {
|
||||||
|
var a = 42, b;
|
||||||
|
switch (b = a) {
|
||||||
|
case a:
|
||||||
|
case b:
|
||||||
|
case a++:
|
||||||
|
}
|
||||||
|
console.log(a === b++ ? "PASS" : "FAIL");
|
||||||
|
}
|
||||||
|
expect: {
|
||||||
|
var a = 42, b;
|
||||||
|
switch (b = a) {
|
||||||
|
case a:
|
||||||
|
case b:
|
||||||
|
case a++:
|
||||||
|
}
|
||||||
|
console.log(a === b++ ? "PASS" : "FAIL");
|
||||||
|
}
|
||||||
|
expect_stdout: "PASS"
|
||||||
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user