@@ -4927,7 +4927,7 @@ merge(Compressor.prototype, {
|
|||||||
if (def.single_use) return;
|
if (def.single_use) return;
|
||||||
if (top_retain(def)) return;
|
if (top_retain(def)) return;
|
||||||
if (sym.fixed_value() !== right) return;
|
if (sym.fixed_value() !== right) return;
|
||||||
return right instanceof AST_Object;
|
return right instanceof AST_Object && right.properties.length > 0;
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
|
||||||
|
|||||||
@@ -912,3 +912,31 @@ issue_3440: {
|
|||||||
}
|
}
|
||||||
expect_stdout: "PASS"
|
expect_stdout: "PASS"
|
||||||
}
|
}
|
||||||
|
|
||||||
|
issue_3868: {
|
||||||
|
options = {
|
||||||
|
hoist_props: true,
|
||||||
|
passes: 2,
|
||||||
|
reduce_vars: true,
|
||||||
|
side_effects: true,
|
||||||
|
}
|
||||||
|
input: {
|
||||||
|
(function(t) {
|
||||||
|
t = {};
|
||||||
|
({
|
||||||
|
get p() {},
|
||||||
|
q: (console.log("PASS"), +t),
|
||||||
|
}).r;
|
||||||
|
})();
|
||||||
|
}
|
||||||
|
expect: {
|
||||||
|
(function(t) {
|
||||||
|
t = {};
|
||||||
|
({
|
||||||
|
get p() {},
|
||||||
|
q: (console.log("PASS"), +t),
|
||||||
|
}).r;
|
||||||
|
})();
|
||||||
|
}
|
||||||
|
expect_stdout: "PASS"
|
||||||
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user