fix corner case in inline (#4322)

fixes #4321
This commit is contained in:
Alex Lam S.L
2020-11-28 19:48:42 +00:00
committed by GitHub
parent af1cca25bf
commit 8791f258e3
2 changed files with 35 additions and 3 deletions

View File

@@ -1710,3 +1710,34 @@ issue_4319: {
expect_stdout: "undefined"
node_version: ">=6"
}
issue_4321: {
options = {
inline: true,
keep_fargs: "strict",
}
input: {
try {
console.log(function({}) {
return function() {
while (!console);
}();
}());
} catch (e) {
console.log("PASS");
}
}
expect: {
try {
console.log(function({}) {
return function() {
while (!console);
}();
}());
} catch (e) {
console.log("PASS");
}
}
expect_stdout: "PASS"
node_version: ">=6"
}