@@ -13508,6 +13508,12 @@ Compressor.prototype.compress = function(node) {
|
||||
def(AST_LabeledStatement, function(compressor, scope, no_return, in_loop) {
|
||||
var body = this.body.try_inline(compressor, scope, no_return, in_loop);
|
||||
if (!body) return;
|
||||
if (this.body instanceof AST_IterationStatement && body instanceof AST_BlockStatement) {
|
||||
var loop = body.body.pop();
|
||||
this.body = loop;
|
||||
body.body.push(this);
|
||||
return body;
|
||||
}
|
||||
this.body = body;
|
||||
return this;
|
||||
});
|
||||
|
||||
@@ -8350,3 +8350,23 @@ issue_5376_2: {
|
||||
}
|
||||
expect_stdout: Error("PASS")
|
||||
}
|
||||
|
||||
issue_5401: {
|
||||
options = {
|
||||
inline: true,
|
||||
}
|
||||
input: {
|
||||
L: for (var a in function() {
|
||||
while (console.log("PASS"));
|
||||
}(), a) do {
|
||||
continue L;
|
||||
} while (console.log("FAIL"));
|
||||
}
|
||||
expect: {
|
||||
while (console.log("PASS"));
|
||||
L: for (var a in a) do {
|
||||
continue L;
|
||||
} while (console.log("FAIL"));
|
||||
}
|
||||
expect_stdout: "PASS"
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user