aboutsummaryrefslogtreecommitdiff
path: root/lib/scope.js
diff options
context:
space:
mode:
authorAlex Lam S.L <alexlamsl@gmail.com>2020-12-19 12:47:46 +0800
committerGitHub <noreply@github.com>2020-12-19 12:47:46 +0800
commit9a5aede94147bf5769054fd933b1c15690915d25 (patch)
tree4901f7aea01c91dc94a43ee6e04c7324901a5528 /lib/scope.js
parente6dd471f8fff84c878153008139150a090c5ba19 (diff)
downloadtracifyjs-9a5aede94147bf5769054fd933b1c15690915d25.tar.gz
tracifyjs-9a5aede94147bf5769054fd933b1c15690915d25.zip
fix corner case in `reduce_vars` & `unused` (#4414)
fixes #4413
Diffstat (limited to 'lib/scope.js')
-rw-r--r--lib/scope.js1
1 files changed, 1 insertions, 0 deletions
diff --git a/lib/scope.js b/lib/scope.js
index 187309ca..fac673bc 100644
--- a/lib/scope.js
+++ b/lib/scope.js
@@ -257,6 +257,7 @@ AST_Toplevel.DEFMETHOD("figure_out_scope", function(options) {
sym = self.def_global(node);
} else if (name == "arguments"
&& sym.orig[0] instanceof AST_SymbolFunarg
+ && !(sym.orig[1] instanceof AST_SymbolFunarg)
&& !(sym.scope instanceof AST_Arrow)) {
var parent = tw.parent();
if (parent instanceof AST_Assign && parent.left === node