fix corner case in inline (#5367)

fixes #5366
This commit is contained in:
Alex Lam S.L
2022-02-21 03:31:29 +00:00
committed by GitHub
parent dd3b81dec6
commit 313e4974a4
2 changed files with 26 additions and 2 deletions

View File

@@ -8207,3 +8207,24 @@ issue_5332_2: {
}
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",
]
}