@@ -1283,6 +1283,7 @@ merge(Compressor.prototype, {
|
|||||||
}
|
}
|
||||||
branch.expression = branch.expression.transform(scanner);
|
branch.expression = branch.expression.transform(scanner);
|
||||||
if (!replace_all) break;
|
if (!replace_all) break;
|
||||||
|
scan_rhs = false;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
abort = true;
|
abort = true;
|
||||||
|
|||||||
@@ -6435,3 +6435,36 @@ call_assign_order: {
|
|||||||
}
|
}
|
||||||
expect_stdout: "PASS PASS"
|
expect_stdout: "PASS PASS"
|
||||||
}
|
}
|
||||||
|
|
||||||
|
issue_3573: {
|
||||||
|
options = {
|
||||||
|
collapse_vars: true,
|
||||||
|
}
|
||||||
|
input: {
|
||||||
|
var c = 0;
|
||||||
|
(function(b) {
|
||||||
|
while (--b) {
|
||||||
|
b = NaN;
|
||||||
|
switch (0 / this < 0) {
|
||||||
|
case c++, false:
|
||||||
|
case c++, NaN:
|
||||||
|
}
|
||||||
|
}
|
||||||
|
})(3);
|
||||||
|
console.log(c);
|
||||||
|
}
|
||||||
|
expect: {
|
||||||
|
var c = 0;
|
||||||
|
(function(b) {
|
||||||
|
while (--b) {
|
||||||
|
b = NaN;
|
||||||
|
switch (0 / this < 0) {
|
||||||
|
case c++, false:
|
||||||
|
case c++, NaN:
|
||||||
|
}
|
||||||
|
}
|
||||||
|
})(3);
|
||||||
|
console.log(c);
|
||||||
|
}
|
||||||
|
expect_stdout: "1"
|
||||||
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user