@@ -2248,8 +2248,11 @@ Compressor.prototype.compress = function(node) {
|
||||
var lvalues = get_lvalues(candidate);
|
||||
var lhs_local = is_lhs_local(lhs);
|
||||
var rhs_value = get_rvalue(candidate);
|
||||
var rvalue = !compound && rhs_value instanceof AST_Sequence ? rhs_value.tail_node() : rhs_value;
|
||||
if (!side_effects) side_effects = value_has_side_effects();
|
||||
var rvalue = rhs_value;
|
||||
if (!side_effects) {
|
||||
if (!compound && rvalue instanceof AST_Sequence) rvalue = rvalue.tail_node();
|
||||
side_effects = value_has_side_effects();
|
||||
}
|
||||
var check_destructured = in_try || !lhs_local ? function(node) {
|
||||
return node instanceof AST_Destructured;
|
||||
} : return_false;
|
||||
|
||||
@@ -9925,3 +9925,25 @@ issue_5309_2: {
|
||||
}
|
||||
expect_stdout: "PASS"
|
||||
}
|
||||
|
||||
issue_5394: {
|
||||
options = {
|
||||
collapse_vars: true,
|
||||
evaluate: true,
|
||||
}
|
||||
input: {
|
||||
try {
|
||||
throw A.p = (console.log("FAIL"), []), !1;
|
||||
} catch (e) {
|
||||
console.log(typeof e);
|
||||
}
|
||||
}
|
||||
expect: {
|
||||
try {
|
||||
throw !(A.p = (console.log("FAIL"), []));
|
||||
} catch (e) {
|
||||
console.log(typeof e);
|
||||
}
|
||||
}
|
||||
expect_stdout: "object"
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user