fix corner case in arguments (#3939)

This commit is contained in:
Alex Lam S.L
2020-05-31 05:18:27 +01:00
committed by GitHub
parent 0eb4577a82
commit 06ba4e2ce8
2 changed files with 45 additions and 37 deletions

View File

@@ -8322,7 +8322,8 @@ merge(Compressor.prototype, {
var argname = fn.argnames[index];
if (def.deleted && def.deleted[index]) {
argname = null;
} else if (argname && compressor.has_directive("use strict")) {
} else if (argname && (compressor.has_directive("use strict")
|| !(fn_parent instanceof AST_Call && index < fn_parent.args.length))) {
var arg_def = argname.definition();
if (!compressor.option("reduce_vars")
|| def.reassigned