@@ -1286,7 +1286,7 @@ merge(Compressor.prototype, {
|
||||
col: node.start.col
|
||||
});
|
||||
if (candidate instanceof AST_UnaryPostfix) {
|
||||
lhs.definition().fixed = false;
|
||||
if (lhs instanceof AST_SymbolRef) lhs.definition().fixed = false;
|
||||
return make_node(AST_UnaryPrefix, candidate, candidate);
|
||||
}
|
||||
if (candidate instanceof AST_VarDef) {
|
||||
|
||||
@@ -8538,3 +8538,25 @@ issue_4051: {
|
||||
}
|
||||
expect_stdout: "undefined"
|
||||
}
|
||||
|
||||
issue_4070: {
|
||||
options = {
|
||||
collapse_vars: true,
|
||||
pure_getters: "strict",
|
||||
reduce_vars: true,
|
||||
}
|
||||
input: {
|
||||
console.log(function f() {
|
||||
function g() {}
|
||||
g.p++;
|
||||
return f.p = g.p;
|
||||
}());
|
||||
}
|
||||
expect: {
|
||||
console.log(function f() {
|
||||
function g() {}
|
||||
return f.p = ++g.p;
|
||||
}());
|
||||
}
|
||||
expect_stdout: "NaN"
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user