@@ -3502,7 +3502,8 @@ merge(Compressor.prototype, {
|
|||||||
var left = this.left._eval(compressor, ignore_side_effects, cached, depth);
|
var left = this.left._eval(compressor, ignore_side_effects, cached, depth);
|
||||||
if (left === this.left) return this;
|
if (left === this.left) return this;
|
||||||
if (this.operator == (left ? "||" : "&&")) return left;
|
if (this.operator == (left ? "||" : "&&")) return left;
|
||||||
var right = this.right._eval(compressor, ignore_side_effects, cached, depth);
|
var rhs_ignore_side_effects = ignore_side_effects && !(left && typeof left == "object");
|
||||||
|
var right = this.right._eval(compressor, rhs_ignore_side_effects, cached, depth);
|
||||||
if (right === this.right) return this;
|
if (right === this.right) return this;
|
||||||
var result;
|
var result;
|
||||||
switch (this.operator) {
|
switch (this.operator) {
|
||||||
|
|||||||
@@ -2894,3 +2894,17 @@ issue_4067: {
|
|||||||
}
|
}
|
||||||
expect_stdout: "NaN"
|
expect_stdout: "NaN"
|
||||||
}
|
}
|
||||||
|
|
||||||
|
issue_4077: {
|
||||||
|
options = {
|
||||||
|
evaluate: true,
|
||||||
|
unsafe: true,
|
||||||
|
}
|
||||||
|
input: {
|
||||||
|
console.log((a = []) - (a[0]++, 1) || "PASS");
|
||||||
|
}
|
||||||
|
expect: {
|
||||||
|
console.log((a = []) - (a[0]++, 1) || "PASS");
|
||||||
|
}
|
||||||
|
expect_stdout: "PASS"
|
||||||
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user