@@ -12925,6 +12925,7 @@ Compressor.prototype.compress = function(node) {
|
||||
if (scope instanceof AST_Toplevel && fn.variables.size() > (arrow ? 0 : 1)) {
|
||||
if (!compressor.toplevel.vars) return;
|
||||
if (fn.functions.size() > 0 && !compressor.toplevel.funcs) return;
|
||||
defined.set("arguments", true);
|
||||
}
|
||||
var async = is_async(fn);
|
||||
if (async && !(compressor.option("awaits") && is_async(scope))) return;
|
||||
|
||||
@@ -906,3 +906,24 @@ issue_4772: {
|
||||
expect_stdout: "PASS"
|
||||
node_version: ">=4"
|
||||
}
|
||||
|
||||
issue_5251: {
|
||||
options = {
|
||||
inline: true,
|
||||
toplevel: true,
|
||||
}
|
||||
input: {
|
||||
(() => {
|
||||
while (console.log(arguments))
|
||||
var arguments = "FAIL";
|
||||
})();
|
||||
}
|
||||
expect: {
|
||||
(() => {
|
||||
while (console.log(arguments))
|
||||
var arguments = "FAIL";
|
||||
})();
|
||||
}
|
||||
expect_stdout: true
|
||||
node_version: ">=4"
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user