@@ -6226,6 +6226,7 @@ merge(Compressor.prototype, {
|
||||
&& var_defs[sym.id] == 1
|
||||
&& sym.assignments == 0
|
||||
&& value instanceof AST_LambdaExpression
|
||||
&& !is_arguments(sym)
|
||||
&& !is_arrow(value)
|
||||
&& assigned_once(value, sym.references)
|
||||
&& can_declare_defun(value)
|
||||
|
||||
@@ -5991,3 +5991,33 @@ issue_4788: {
|
||||
}
|
||||
expect_stdout: "PASS"
|
||||
}
|
||||
|
||||
issue_4823: {
|
||||
options = {
|
||||
functions: true,
|
||||
reduce_vars: true,
|
||||
unused: true,
|
||||
}
|
||||
input: {
|
||||
console.log(typeof function() {
|
||||
{
|
||||
function f() {}
|
||||
var arguments = f();
|
||||
function g() {}
|
||||
var arguments = g;
|
||||
}
|
||||
return f && arguments;
|
||||
}());
|
||||
}
|
||||
expect: {
|
||||
console.log(typeof function() {
|
||||
{
|
||||
function f() {}
|
||||
arguments = f();
|
||||
var arguments = function() {};
|
||||
}
|
||||
return f && arguments;
|
||||
}());
|
||||
}
|
||||
expect_stdout: "function"
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user