fix corner case in arguments (#4967)
This commit is contained in:
@@ -11543,15 +11543,15 @@ merge(Compressor.prototype, {
|
||||
}
|
||||
var parent = compressor.parent();
|
||||
var assigned = is_lhs(compressor.self(), parent);
|
||||
var def, fn, fn_parent;
|
||||
var def, fn, fn_parent, index;
|
||||
if (compressor.option("arguments")
|
||||
&& expr instanceof AST_SymbolRef
|
||||
&& is_arguments(def = expr.definition())
|
||||
&& !expr.in_arg
|
||||
&& prop instanceof AST_Number
|
||||
&& Math.floor(index = prop.value) == index
|
||||
&& (fn = def.scope) === find_lambda()
|
||||
&& fn.uses_arguments < (assigned ? 2 : 3)) {
|
||||
var index = prop.value;
|
||||
if (parent instanceof AST_UnaryPrefix && parent.operator == "delete") {
|
||||
if (!def.deleted) def.deleted = [];
|
||||
def.deleted[index] = true;
|
||||
|
||||
Reference in New Issue
Block a user