var seq = lift_sequence_in_expression(self, compressor);
if (seq !== self) return seq.optimize(compressor);
}
+ if (compressor.option("unused")) drop_unused_call_args(self, compressor);
if (compressor.option("unsafe")) {
var exp = self.expression;
if (is_undeclared_ref(exp)) {
expect: {
(function f() {
new function(a) {
- console.log(typeof f, 2 ** 30, typeof this);
- }(0, A = 0);
+ console.log(typeof f, 1073741824, typeof this);
+ }(A = 0);
})();
}
expect_stdout: "function 1073741824 object"
expect_stdout: true
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"
+}