@@ -1982,7 +1982,7 @@ Compressor.prototype.compress = function(node) {
|
|||||||
abort = true;
|
abort = true;
|
||||||
folded = make_node(AST_Binary, candidate, {
|
folded = make_node(AST_Binary, candidate, {
|
||||||
operator: compound,
|
operator: compound,
|
||||||
left: lhs.fixed ? lhs.fixed.to_binary() : lhs,
|
left: lhs.fixed && lhs.definition().fixed ? lhs.fixed.to_binary() : lhs,
|
||||||
right: rvalue,
|
right: rvalue,
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
@@ -2040,7 +2040,7 @@ Compressor.prototype.compress = function(node) {
|
|||||||
});
|
});
|
||||||
if (candidate instanceof AST_UnaryPostfix) return make_node(AST_UnaryPrefix, candidate, {
|
if (candidate instanceof AST_UnaryPostfix) return make_node(AST_UnaryPrefix, candidate, {
|
||||||
operator: candidate.operator,
|
operator: candidate.operator,
|
||||||
expression: lhs.fixed ? lhs.fixed.to_prefix() : lhs,
|
expression: lhs.fixed && lhs.definition().fixed ? lhs.fixed.to_prefix() : lhs,
|
||||||
});
|
});
|
||||||
if (candidate instanceof AST_VarDef) {
|
if (candidate instanceof AST_VarDef) {
|
||||||
var def = candidate.name.definition();
|
var def = candidate.name.definition();
|
||||||
|
|||||||
@@ -9790,3 +9790,23 @@ issue_5276: {
|
|||||||
}
|
}
|
||||||
expect_stdout: "PASS"
|
expect_stdout: "PASS"
|
||||||
}
|
}
|
||||||
|
|
||||||
|
issue_5277: {
|
||||||
|
options = {
|
||||||
|
collapse_vars: true,
|
||||||
|
reduce_vars: true,
|
||||||
|
unused: true,
|
||||||
|
}
|
||||||
|
input: {
|
||||||
|
console.log(function() {
|
||||||
|
var a = function() {
|
||||||
|
a += null;
|
||||||
|
a -= 42;
|
||||||
|
};
|
||||||
|
}());
|
||||||
|
}
|
||||||
|
expect: {
|
||||||
|
console.log(function() {}());
|
||||||
|
}
|
||||||
|
expect_stdout: "undefined"
|
||||||
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user