@@ -3243,6 +3243,7 @@ merge(Compressor.prototype, {
|
||||
}
|
||||
if (isNaN(result)) return compressor.find_parent(AST_With) ? this : result;
|
||||
if (compressor.option("unsafe_math")
|
||||
&& !ignore_side_effects
|
||||
&& result
|
||||
&& typeof result == "number"
|
||||
&& (this.operator == "+" || this.operator == "-")) {
|
||||
|
||||
@@ -2174,3 +2174,19 @@ issue_3738: {
|
||||
}
|
||||
expect_stdout: "Infinity"
|
||||
}
|
||||
|
||||
issue_3755: {
|
||||
options = {
|
||||
booleans: true,
|
||||
evaluate: true,
|
||||
unsafe: true,
|
||||
unsafe_math: true,
|
||||
}
|
||||
input: {
|
||||
console.log((/4/.exec(1 + (!0 - 5 / "23")) || 0).p);
|
||||
}
|
||||
expect: {
|
||||
console.log((/4/.exec(!0 - 5 / "23" + 1), 0).p);
|
||||
}
|
||||
expect_stdout: "undefined"
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user