@@ -912,10 +912,16 @@ merge(Compressor.prototype, {
|
|||||||
init.walk(tw);
|
init.walk(tw);
|
||||||
if (init instanceof AST_Definitions) {
|
if (init instanceof AST_Definitions) {
|
||||||
init.definitions[0].name.match_symbol(function(node) {
|
init.definitions[0].name.match_symbol(function(node) {
|
||||||
if (node instanceof AST_SymbolDeclaration) node.definition().fixed = false;
|
if (node instanceof AST_SymbolDeclaration) {
|
||||||
|
var def = node.definition();
|
||||||
|
def.assignments++;
|
||||||
|
def.fixed = false;
|
||||||
|
}
|
||||||
}, true);
|
}, true);
|
||||||
} else if (init instanceof AST_SymbolRef) {
|
} else if (init instanceof AST_SymbolRef && !init.is_immutable()) {
|
||||||
init.definition().fixed = false;
|
var def = init.definition();
|
||||||
|
def.assignments++;
|
||||||
|
def.fixed = false;
|
||||||
}
|
}
|
||||||
this.body.walk(tw);
|
this.body.walk(tw);
|
||||||
pop(tw);
|
pop(tw);
|
||||||
|
|||||||
@@ -942,3 +942,23 @@ issue_4410_3: {
|
|||||||
}
|
}
|
||||||
expect_stdout: "PASS"
|
expect_stdout: "PASS"
|
||||||
}
|
}
|
||||||
|
|
||||||
|
issue_4432: {
|
||||||
|
options = {
|
||||||
|
arguments: true,
|
||||||
|
reduce_vars: true,
|
||||||
|
}
|
||||||
|
input: {
|
||||||
|
console.log(function(a) {
|
||||||
|
for (a in { FAIL: 42 });
|
||||||
|
return arguments[0];
|
||||||
|
}() || "PASS");
|
||||||
|
}
|
||||||
|
expect: {
|
||||||
|
console.log(function(a) {
|
||||||
|
for (a in { FAIL: 42 });
|
||||||
|
return arguments[0];
|
||||||
|
}() || "PASS");
|
||||||
|
}
|
||||||
|
expect_stdout: "PASS"
|
||||||
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user