@@ -2497,9 +2497,10 @@ merge(Compressor.prototype, {
|
|||||||
&& (!(right instanceof AST_Constant) || right.value == 0);
|
&& (!(right instanceof AST_Constant) || right.value == 0);
|
||||||
case "&&":
|
case "&&":
|
||||||
case "||":
|
case "||":
|
||||||
case "*":
|
|
||||||
return left.is_negative_zero() || right.is_negative_zero();
|
return left.is_negative_zero() || right.is_negative_zero();
|
||||||
|
case "*":
|
||||||
case "/":
|
case "/":
|
||||||
|
return true;
|
||||||
case "%":
|
case "%":
|
||||||
return left.is_negative_zero();
|
return left.is_negative_zero();
|
||||||
default:
|
default:
|
||||||
|
|||||||
@@ -1215,3 +1215,21 @@ issue_3682_3: {
|
|||||||
}
|
}
|
||||||
expect_stdout: "-Infinity"
|
expect_stdout: "-Infinity"
|
||||||
}
|
}
|
||||||
|
|
||||||
|
issue_3684: {
|
||||||
|
options = {
|
||||||
|
evaluate: true,
|
||||||
|
}
|
||||||
|
input: {
|
||||||
|
console.log(1 / (-1 * (0 & console) + 0));
|
||||||
|
console.log(1 / ((0 & console) / -1 + 0));
|
||||||
|
}
|
||||||
|
expect: {
|
||||||
|
console.log(1 / (-1 * (0 & console) + 0));
|
||||||
|
console.log(1 / ((0 & console) / -1 + 0));
|
||||||
|
}
|
||||||
|
expect_stdout: [
|
||||||
|
"Infinity",
|
||||||
|
"Infinity",
|
||||||
|
]
|
||||||
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user