@@ -13454,8 +13454,11 @@ Compressor.prototype.compress = function(node) {
|
|||||||
inlined = inlined.try_inline(compressor, scope, true, in_loop);
|
inlined = inlined.try_inline(compressor, scope, true, in_loop);
|
||||||
if (inlined) {
|
if (inlined) {
|
||||||
this.init = null;
|
this.init = null;
|
||||||
inlined.body.push(this);
|
if (inlined instanceof AST_BlockStatement) {
|
||||||
return inlined;
|
inlined.body.push(this);
|
||||||
|
return inlined;
|
||||||
|
}
|
||||||
|
return make_node(AST_BlockStatement, inlined, { body: [ inlined, this ] });
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
return body && this;
|
return body && this;
|
||||||
|
|||||||
@@ -8207,3 +8207,24 @@ issue_5332_2: {
|
|||||||
}
|
}
|
||||||
expect_stdout: "NaN"
|
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