fix corner case in merge_vars (#4158)

fixes #4157
This commit is contained in:
Alex Lam S.L
2020-09-28 07:09:55 +01:00
committed by GitHub
parent 92d1391e5e
commit 9e07ac4102
2 changed files with 73 additions and 4 deletions

View File

@@ -4448,15 +4448,16 @@ merge(Compressor.prototype, {
push();
segment.block = node;
walk_body(node, tw);
pop();
if (node.bcatch) {
var def = node.bcatch.argname.definition();
references[def.id] = false;
if (def = def.redefined()) references[def.id] = false;
pop();
push();
if (node.bfinally) segment.block = node.bcatch;
walk_body(node.bcatch, tw);
pop();
}
pop();
if (node.bfinally) node.bfinally.walk(tw);
return true;
}