Consider yield expressions as having side-effects

See #1043
This commit is contained in:
Richard van Velzen
2016-04-13 14:39:49 +02:00
parent 91cdb93e57
commit eaf3911c31
2 changed files with 31 additions and 3 deletions

View File

@@ -978,9 +978,7 @@ merge(Compressor.prototype, {
|| this.alternative.has_side_effects(compressor);
});
def(AST_Unary, function(compressor){
return this.operator == "delete"
|| this.operator == "++"
|| this.operator == "--"
return member(this.operator, ["delete", "++", "--", "yield", "yield*"])
|| this.expression.has_side_effects(compressor);
});
def(AST_SymbolRef, function(compressor){