handle negated constants correctly in collapse_vars (#2975)
fixes #2974
This commit is contained in:
@@ -778,8 +778,7 @@ merge(Compressor.prototype, {
|
||||
lhs = lhs.fixed_value();
|
||||
}
|
||||
if (!lhs) return true;
|
||||
if (lhs instanceof AST_RegExp) return false;
|
||||
if (lhs instanceof AST_Constant) return true;
|
||||
if (lhs.is_constant()) return true;
|
||||
return is_lhs_read_only(lhs);
|
||||
}
|
||||
return false;
|
||||
|
||||
Reference in New Issue
Block a user