@@ -4196,7 +4196,7 @@ merge(Compressor.prototype, {
|
|||||||
var left = this.left;
|
var left = this.left;
|
||||||
if (left instanceof AST_PropAccess) {
|
if (left instanceof AST_PropAccess) {
|
||||||
var expr = left.expression;
|
var expr = left.expression;
|
||||||
if (expr instanceof AST_Assign && !expr.may_throw_on_access(compressor)) {
|
if (expr instanceof AST_Assign && expr.operator == "=" && !expr.may_throw_on_access(compressor)) {
|
||||||
expr.write_only = "p";
|
expr.write_only = "p";
|
||||||
}
|
}
|
||||||
if (compressor.has_directive("use strict") && expr.is_constant()) return this;
|
if (compressor.has_directive("use strict") && expr.is_constant()) return this;
|
||||||
|
|||||||
@@ -3340,3 +3340,33 @@ issue_3506_3: {
|
|||||||
}
|
}
|
||||||
expect_stdout: "PASS"
|
expect_stdout: "PASS"
|
||||||
}
|
}
|
||||||
|
|
||||||
|
issue_3512: {
|
||||||
|
options = {
|
||||||
|
collapse_vars: true,
|
||||||
|
pure_getters: "strict",
|
||||||
|
sequences: true,
|
||||||
|
side_effects: true,
|
||||||
|
unused: true,
|
||||||
|
}
|
||||||
|
input: {
|
||||||
|
var a = "PASS";
|
||||||
|
(function(b) {
|
||||||
|
(function() {
|
||||||
|
b <<= this || 1;
|
||||||
|
b.a = "FAIL";
|
||||||
|
})();
|
||||||
|
})();
|
||||||
|
console.log(a);
|
||||||
|
}
|
||||||
|
expect: {
|
||||||
|
var a = "PASS";
|
||||||
|
(function(b) {
|
||||||
|
(function() {
|
||||||
|
(b <<= this || 1).a = "FAIL";
|
||||||
|
})();
|
||||||
|
})(),
|
||||||
|
console.log(a);
|
||||||
|
}
|
||||||
|
expect_stdout: "PASS"
|
||||||
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user