@@ -9393,6 +9393,7 @@ merge(Compressor.prototype, {
|
|||||||
var seq = lift_sequence_in_expression(self, compressor);
|
var seq = lift_sequence_in_expression(self, compressor);
|
||||||
if (seq !== self) return seq.optimize(compressor);
|
if (seq !== self) return seq.optimize(compressor);
|
||||||
}
|
}
|
||||||
|
if (compressor.option("unused")) drop_unused_call_args(self, compressor);
|
||||||
if (compressor.option("unsafe")) {
|
if (compressor.option("unsafe")) {
|
||||||
var exp = self.expression;
|
var exp = self.expression;
|
||||||
if (is_undeclared_ref(exp)) {
|
if (is_undeclared_ref(exp)) {
|
||||||
|
|||||||
@@ -99,8 +99,8 @@ issue_4664: {
|
|||||||
expect: {
|
expect: {
|
||||||
(function f() {
|
(function f() {
|
||||||
new function(a) {
|
new function(a) {
|
||||||
console.log(typeof f, 2 ** 30, typeof this);
|
console.log(typeof f, 1073741824, typeof this);
|
||||||
}(0, A = 0);
|
}(A = 0);
|
||||||
})();
|
})();
|
||||||
}
|
}
|
||||||
expect_stdout: "function 1073741824 object"
|
expect_stdout: "function 1073741824 object"
|
||||||
|
|||||||
@@ -1045,3 +1045,26 @@ issue_4614: {
|
|||||||
expect_stdout: true
|
expect_stdout: true
|
||||||
node_version: ">=6"
|
node_version: ">=6"
|
||||||
}
|
}
|
||||||
|
|
||||||
|
issue_4849: {
|
||||||
|
options = {
|
||||||
|
reduce_vars: true,
|
||||||
|
unused: true,
|
||||||
|
}
|
||||||
|
input: {
|
||||||
|
while (function() {
|
||||||
|
while (!console);
|
||||||
|
}(new function(a) {
|
||||||
|
console.log(typeof { ...a });
|
||||||
|
}(function() {})));
|
||||||
|
}
|
||||||
|
expect: {
|
||||||
|
while (function() {
|
||||||
|
while (!console);
|
||||||
|
}(function(a) {
|
||||||
|
console.log(typeof { ...function() {} });
|
||||||
|
}()));
|
||||||
|
}
|
||||||
|
expect_stdout: "object"
|
||||||
|
node_version: ">=8"
|
||||||
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user