fix corner case in inline (#5410)

fixes #5409
This commit is contained in:
Alex Lam S.L
2022-04-06 05:23:47 +01:00
committed by GitHub
parent ccd77d70db
commit 998c9792da
4 changed files with 50 additions and 20 deletions

View File

@@ -8370,3 +8370,31 @@ issue_5401: {
}
expect_stdout: "PASS"
}
issue_5409: {
options = {
inline: true,
merge_vars: true,
reduce_vars: true,
unused: true,
}
input: {
(function(a) {
(a = console) || FAIL(a);
(function(b) {
console.log(b && b);
while (!console);
})();
})();
}
expect: {
(function(a) {
(a = console) || FAIL(a);
a = void 0;
console.log(a && a);
while (!console);
return;
})();
}
expect_stdout: "undefined"
}