fix corner case in hoist_props (#3022)

fixes #3021
This commit is contained in:
Alex Lam S.L
2018-03-23 07:27:35 +08:00
committed by GitHub
parent 49bfc6b555
commit 12985d86c2
2 changed files with 32 additions and 1 deletions

View File

@@ -3624,8 +3624,9 @@ merge(Compressor.prototype, {
var sym = node.name, def, value;
if (sym.scope === self
&& (def = sym.definition()).escaped != 1
&& !def.single_use
&& !def.assignments
&& !def.direct_access
&& !def.single_use
&& !top_retain(def)
&& (value = sym.fixed_value()) === node.value
&& value instanceof AST_Object) {