fix corner cases in rename & varify (#4955)

fixes #4954
This commit is contained in:
Alex Lam S.L
2021-05-23 23:54:48 +01:00
committed by GitHub
parent 5d4e6e3bdc
commit 8b0c836515
5 changed files with 118 additions and 12 deletions

View File

@@ -8604,6 +8604,8 @@ merge(Compressor.prototype, {
if (def.scope === scope) return;
def.scope = scope;
scope.variables.set(def.name, def);
scope.enclosed.push(def);
scope.var_names()[def.name] = true;
}),
value: defn.value,
});