fix corner case in if_return (#5675)
This commit is contained in:
@@ -1828,12 +1828,11 @@ Compressor.prototype.compress = function(node) {
|
||||
return wrap ? make_sequence(orig, [ make_node(AST_Number, orig, { value: 0 }), val ]) : val;
|
||||
}
|
||||
|
||||
function merge_expression(base, target, scope) {
|
||||
function merge_expression(base, target) {
|
||||
var fixed_by_id = new Dictionary();
|
||||
base.walk(new TreeWalker(function(node) {
|
||||
if (!(node instanceof AST_SymbolRef)) return;
|
||||
var def = node.definition();
|
||||
if (scope && def.scope.resolve() !== scope) return;
|
||||
var fixed = node.fixed;
|
||||
if (!fixed || !fixed_by_id.has(def.id)) {
|
||||
fixed_by_id.set(def.id, fixed);
|
||||
@@ -3836,7 +3835,7 @@ Compressor.prototype.compress = function(node) {
|
||||
case 2:
|
||||
value = value.tail_node();
|
||||
}
|
||||
merge_expression(value, jump.value, scope);
|
||||
merge_expression(value, jump.value);
|
||||
}
|
||||
|
||||
function next_index(i) {
|
||||
|
||||
Reference in New Issue
Block a user