Do not lift sequence from right-hand side of binary operation. Fix #343

This commit is contained in:
Mihai Bazon
2013-11-06 10:18:28 +02:00
parent bb700daa4c
commit f4919e3a25

View File

@@ -1875,16 +1875,6 @@ merge(Compressor.prototype, {
seq = AST_Seq.from_array(x).transform(compressor);
return seq;
}
if (this.right instanceof AST_Seq
&& !(this.operator == "||" || this.operator == "&&")
&& !this.left.has_side_effects(compressor)) {
var seq = this.right;
var x = seq.to_array();
this.right = x.pop();
x.push(this);
seq = AST_Seq.from_array(x).transform(compressor);
return seq;
}
}
return this;
});