fix corner cases in inline (#5255)

fixes #5254
This commit is contained in:
Alex Lam S.L
2022-01-02 13:24:41 +00:00
committed by GitHub
parent f7841bc8b8
commit 7889192cae
4 changed files with 204 additions and 18 deletions

View File

@@ -1878,3 +1878,31 @@ issue_5240: {
]
node_version: ">=4"
}
issue_5254: {
options = {
inline: true,
toplevel: true,
}
input: {
"use strict";
do {
(function() {
let a = console.log;
a && a("foo");
})();
} while (console.log("bar"));
}
expect: {
"use strict";
do {
let a = console.log;
a && a("foo");
} while (console.log("bar"));
}
expect_stdout: [
"foo",
"bar",
]
node_version: ">=4"
}