fix corner case in inline (#5115)

fixes #5114
This commit is contained in:
Alex Lam S.L
2021-08-18 08:57:08 +01:00
committed by GitHub
parent 02eb8baa1c
commit befb99bd71
2 changed files with 69 additions and 0 deletions

View File

@@ -9980,6 +9980,7 @@ merge(Compressor.prototype, {
operator: "=",
left: make_node(AST_DestructuredArray, self, {
elements: fn.argnames.map(function(argname) {
if (argname.__unused) return make_node(AST_Hole, argname);
return argname.convert_symbol(AST_SymbolRef, process);
}),
rest: fn.rest && fn.rest.convert_symbol(AST_SymbolRef, process),