aboutsummaryrefslogtreecommitdiff
path: root/lib/scope.js
diff options
context:
space:
mode:
authorAlex Lam S.L <alexlamsl@gmail.com>2018-07-26 16:35:43 +0800
committerGitHub <noreply@github.com>2018-07-26 16:35:43 +0800
commit304db15a20551fad9b4ee1a55c1777ea7844416a (patch)
tree923eafbb42acaf615efc4ce74ec8705c74ce1dda /lib/scope.js
parent7cf72b8d66ea3a504648f42a2142728d520f3141 (diff)
downloadtracifyjs-304db15a20551fad9b4ee1a55c1777ea7844416a.tar.gz
tracifyjs-304db15a20551fad9b4ee1a55c1777ea7844416a.zip
fix corner case in `ie8` & `rename` (#3223)
Diffstat (limited to 'lib/scope.js')
-rw-r--r--lib/scope.js3
1 files changed, 2 insertions, 1 deletions
diff --git a/lib/scope.js b/lib/scope.js
index ab207d60..ac7df7df 100644
--- a/lib/scope.js
+++ b/lib/scope.js
@@ -136,7 +136,8 @@ AST_Toplevel.DEFMETHOD("figure_out_scope", function(options) {
// AST_Defun node before getting to its AST_Symbol.
(node.scope = defun.parent_scope.resolve()).def_function(node, defun);
} else if (node instanceof AST_SymbolLambda) {
- defun.def_function(node, node.name == "arguments" ? undefined : defun);
+ var def = defun.def_function(node, node.name == "arguments" ? undefined : defun);
+ if (options.ie8) def.defun = defun.parent_scope.resolve();
} else if (node instanceof AST_SymbolVar) {
defun.def_variable(node, node.TYPE == "SymbolVar" ? null : undefined);
if (defun !== scope) {