aboutsummaryrefslogtreecommitdiff
path: root/lib/scope.js
diff options
context:
space:
mode:
authorAlex Lam S.L <alexlamsl@gmail.com>2021-01-09 20:20:43 +0000
committerGitHub <noreply@github.com>2021-01-10 04:20:43 +0800
commit0818d396c5cca408f161422800b79cf825ab5b9f (patch)
tree6254477faa909a73b1627109c965faa268e75e07 /lib/scope.js
parent770f3ba5fe6bba0768e881dd3fe46b2a21d4a5df (diff)
downloadtracifyjs-0818d396c5cca408f161422800b79cf825ab5b9f.tar.gz
tracifyjs-0818d396c5cca408f161422800b79cf825ab5b9f.zip
fix corner case in `mangle` (#4528)
fixes #4527
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 ea662815..f4a18ca7 100644
--- a/lib/scope.js
+++ b/lib/scope.js
@@ -611,6 +611,7 @@ AST_Toplevel.DEFMETHOD("mangle_names", function(options) {
if (!(sym instanceof AST_SymbolConst)) return false;
var scope = def.scope.resolve();
if (def.scope === scope) return false;
+ if (def.scope.parent_scope.find_variable(sym.name)) return false;
redef = scope.def_variable(sym);
scope.to_mangle.push(redef);
}
>...Julien Lepiller 2019-10-21doc: Add support for "guix-cookbook.texi" to 'build.scm'....Ludovic Courtès 2019-09-25doc: Support paren matching via CSS hover....Ludovic Courtès 2019-09-07doc: Work around (htmlprag) parser issue....Ludovic Courtès 2019-09-07doc: Highlight Scheme syntax in the HTML output....Ludovic Courtès 2019-07-16doc: Add 'images' directory next to HTML pages....Ludovic Courtès 2019-07-15doc: Build a top-level index of the manuals....Ludovic Courtès 2019-07-15doc: Generalize build procedures of HTML indexes....Ludovic Courtès 2019-07-07build: Add 'doc/build.scm' to build on-line copies of the manual....Ludovic Courtès