@@ -4196,7 +4196,7 @@ merge(Compressor.prototype, {
|
|||||||
if (node instanceof AST_Assign) {
|
if (node instanceof AST_Assign) {
|
||||||
if (node.write_only === "p" && node.right.may_throw_on_access(compressor)) return;
|
if (node.write_only === "p" && node.right.may_throw_on_access(compressor)) return;
|
||||||
var right = get_rhs(node);
|
var right = get_rhs(node);
|
||||||
if (init && node.write_only && node_def.scope === self && !right.has_side_effects(compressor)) {
|
if (init && node.write_only === true && node_def.scope === self && !right.has_side_effects(compressor)) {
|
||||||
initializations.add(node_def.id, right);
|
initializations.add(node_def.id, right);
|
||||||
} else {
|
} else {
|
||||||
right.walk(tw);
|
right.walk(tw);
|
||||||
|
|||||||
@@ -2355,3 +2355,23 @@ issue_3664: {
|
|||||||
}
|
}
|
||||||
expect_stdout: "PASS"
|
expect_stdout: "PASS"
|
||||||
}
|
}
|
||||||
|
|
||||||
|
issue_3673: {
|
||||||
|
options = {
|
||||||
|
pure_getters: "strict",
|
||||||
|
side_effects: true,
|
||||||
|
toplevel: true,
|
||||||
|
unused: true,
|
||||||
|
}
|
||||||
|
input: {
|
||||||
|
var a;
|
||||||
|
(a = [ a ]).p = 42;
|
||||||
|
console.log("PASS");
|
||||||
|
}
|
||||||
|
expect: {
|
||||||
|
var a;
|
||||||
|
(a = [ a ]).p = 42;
|
||||||
|
console.log("PASS");
|
||||||
|
}
|
||||||
|
expect_stdout: "PASS"
|
||||||
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user