fix corner case in inline (#4320)

fixes #4319
This commit is contained in:
Alex Lam S.L
2020-11-26 17:31:06 +00:00
committed by GitHub
parent 9b3a363604
commit af1cca25bf
2 changed files with 29 additions and 1 deletions

View File

@@ -1684,3 +1684,29 @@ issue_4315: {
expect_stdout: "PASS"
node_version: ">=6"
}
issue_4319: {
options = {
inline: true,
reduce_vars: true,
toplevel: true,
}
input: {
function f(a) {
while (!a);
}
console.log(function({}) {
return f(console);
}(0));
}
expect: {
function f(a) {
while (!a);
}
console.log(function({}) {
return f(console);
}(0));
}
expect_stdout: "undefined"
node_version: ">=6"
}