@@ -13382,7 +13382,7 @@ Compressor.prototype.compress = function(node) {
|
||||
});
|
||||
var body = [];
|
||||
fn.variables.each(function(def, name) {
|
||||
if (name == "arguments") return;
|
||||
if (!arrow && name == "arguments" && def.orig.length == 1) return;
|
||||
names.set(name, true);
|
||||
scope.enclosed.push(def);
|
||||
scope.variables.set(name, def);
|
||||
|
||||
@@ -1018,3 +1018,57 @@ issue_5356: {
|
||||
expect_stdout: "NaN"
|
||||
node_version: ">=4"
|
||||
}
|
||||
|
||||
issue_5414_1: {
|
||||
options = {
|
||||
arrows: true,
|
||||
if_return: true,
|
||||
inline: true,
|
||||
toplevel: true,
|
||||
}
|
||||
input: {
|
||||
(() => {
|
||||
(() => {
|
||||
if (!console)
|
||||
var arguments = 42;
|
||||
while (console.log(arguments));
|
||||
})();
|
||||
})();
|
||||
}
|
||||
expect: {
|
||||
(() => {
|
||||
if (!console)
|
||||
var arguments = 42;
|
||||
while (console.log(arguments));
|
||||
})();
|
||||
}
|
||||
expect_stdout: true
|
||||
node_version: ">=4"
|
||||
}
|
||||
|
||||
issue_5414_2: {
|
||||
options = {
|
||||
arrows: true,
|
||||
inline: true,
|
||||
side_effects: true,
|
||||
toplevel: true,
|
||||
}
|
||||
input: {
|
||||
(() => {
|
||||
(() => {
|
||||
if (!console)
|
||||
var arguments = 42;
|
||||
while (console.log(arguments));
|
||||
})();
|
||||
})();
|
||||
}
|
||||
expect: {
|
||||
(() => {
|
||||
if (!console)
|
||||
var arguments = 42;
|
||||
while (console.log(arguments));
|
||||
})();
|
||||
}
|
||||
expect_stdout: true
|
||||
node_version: ">=4"
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user