@@ -5541,7 +5541,9 @@ Compressor.prototype.compress = function(node) {
|
||||
});
|
||||
def(AST_ForEnumeration, function(compressor) {
|
||||
if (this.init.may_throw(compressor)) return true;
|
||||
var obj = this.object.tail_node();
|
||||
var obj = this.object;
|
||||
if (obj.may_throw(compressor)) return true;
|
||||
obj = obj.tail_node();
|
||||
if (!(obj instanceof AST_Array || obj.is_string(compressor))) return true;
|
||||
return this.body.may_throw(compressor);
|
||||
});
|
||||
|
||||
@@ -2676,3 +2676,26 @@ issue_5258_2: {
|
||||
expect_stdout: "PASS"
|
||||
node_version: ">=8"
|
||||
}
|
||||
|
||||
issue_5298: {
|
||||
options = {
|
||||
awaits: true,
|
||||
side_effects: true,
|
||||
}
|
||||
input: {
|
||||
var a = "PASS";
|
||||
(async function() {
|
||||
for (a in [ 42 in null ]);
|
||||
})();
|
||||
console.log(a);
|
||||
}
|
||||
expect: {
|
||||
var a = "PASS";
|
||||
(async function() {
|
||||
for (a in [ 42 in null ]);
|
||||
})();
|
||||
console.log(a);
|
||||
}
|
||||
expect_stdout: "PASS"
|
||||
node_version: ">=8"
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user