@@ -12937,9 +12937,7 @@ Compressor.prototype.compress = function(node) {
|
||||
if (!fn.variables.all(function(def, name) {
|
||||
if (in_loop) in_loop.push(def);
|
||||
if (!defined.has(name) && !names.has(name)) return true;
|
||||
if (name != "arguments") return false;
|
||||
if (scope.uses_arguments) return false;
|
||||
return def.references.length == def.replaced;
|
||||
return !arrow && name == "arguments" && def.orig.length == 1;
|
||||
})) return;
|
||||
if (in_loop && in_loop.length > 0 && is_reachable(fn, in_loop)) return;
|
||||
var simple_argnames = true;
|
||||
|
||||
@@ -2092,3 +2092,24 @@ issue_5246_3: {
|
||||
expect_stdout: "undefined"
|
||||
node_version: ">=6"
|
||||
}
|
||||
|
||||
issue_5256: {
|
||||
options = {
|
||||
inline: true,
|
||||
}
|
||||
input: {
|
||||
(function(arguments = console.log) {
|
||||
console;
|
||||
})();
|
||||
console.log(typeof arguments);
|
||||
}
|
||||
expect: {
|
||||
// Syntax error on Node.js v6
|
||||
(function(arguments = console.log) {
|
||||
console;
|
||||
})();
|
||||
console.log(typeof arguments);
|
||||
}
|
||||
expect_stdout: "undefined"
|
||||
node_version: ">=8"
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user