@@ -1549,10 +1549,9 @@ merge(Compressor.prototype, {
|
|||||||
return lvalues.has(node.name.name) || side_effects && may_modify(node.name);
|
return lvalues.has(node.name.name) || side_effects && may_modify(node.name);
|
||||||
}
|
}
|
||||||
var sym = is_lhs(node.left, node);
|
var sym = is_lhs(node.left, node);
|
||||||
if (!sym) return false;
|
if (sym instanceof AST_PropAccess) return true;
|
||||||
return lvalues.has(sym.name)
|
if (!(sym instanceof AST_SymbolRef)) return false;
|
||||||
|| sym instanceof AST_PropAccess
|
return lvalues.has(sym.name) || read_toplevel && compressor.exposed(sym.definition());
|
||||||
|| read_toplevel && compressor.exposed(sym.definition());
|
|
||||||
}
|
}
|
||||||
|
|
||||||
function extract_args() {
|
function extract_args() {
|
||||||
|
|||||||
@@ -8375,3 +8375,19 @@ issue_4038: {
|
|||||||
}
|
}
|
||||||
expect_stdout: "PASS"
|
expect_stdout: "PASS"
|
||||||
}
|
}
|
||||||
|
|
||||||
|
issue_4040: {
|
||||||
|
options = {
|
||||||
|
collapse_vars: true,
|
||||||
|
toplevel: true,
|
||||||
|
}
|
||||||
|
input: {
|
||||||
|
var a = console.log("PASS") && a.p;
|
||||||
|
delete NaN;
|
||||||
|
}
|
||||||
|
expect: {
|
||||||
|
var a = console.log("PASS") && a.p;
|
||||||
|
delete NaN;
|
||||||
|
}
|
||||||
|
expect_stdout: "PASS"
|
||||||
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user