fix corner cases of catch variable inlining (#4169)

This commit is contained in:
Alex Lam S.L
2020-10-03 00:02:28 +01:00
committed by GitHub
parent 35465d590e
commit baf4903aa7
5 changed files with 193 additions and 26 deletions

View File

@@ -228,6 +228,7 @@ AST_Toplevel.DEFMETHOD("figure_out_scope", function(options) {
}
old_def.defun = new_def.scope;
old_def.orig.concat(old_def.references).forEach(function(node) {
node.redef = true;
node.thedef = new_def;
node.reference(options);
});