@@ -13454,9 +13454,12 @@ Compressor.prototype.compress = function(node) {
|
||||
inlined = inlined.try_inline(compressor, scope, true, in_loop);
|
||||
if (inlined) {
|
||||
this.init = null;
|
||||
if (inlined instanceof AST_BlockStatement) {
|
||||
inlined.body.push(this);
|
||||
return inlined;
|
||||
}
|
||||
return make_node(AST_BlockStatement, inlined, { body: [ inlined, this ] });
|
||||
}
|
||||
}
|
||||
return body && this;
|
||||
});
|
||||
|
||||
@@ -8207,3 +8207,24 @@ issue_5332_2: {
|
||||
}
|
||||
expect_stdout: "NaN"
|
||||
}
|
||||
|
||||
issue_5366: {
|
||||
options = {
|
||||
inline: true,
|
||||
}
|
||||
input: {
|
||||
for (console.log("foo") || function() {
|
||||
while (console.log("bar"));
|
||||
}(); console.log("baz") ;);
|
||||
}
|
||||
expect: {
|
||||
if (!console.log("foo"))
|
||||
while (console.log("bar"));
|
||||
for (;console.log("baz"););
|
||||
}
|
||||
expect_stdout: [
|
||||
"foo",
|
||||
"bar",
|
||||
"baz",
|
||||
]
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user