fix corner case in inilne (#4204)

fixes #4202
This commit is contained in:
Alex Lam S.L
2020-10-12 16:10:32 +01:00
committed by GitHub
parent 00d0eda85b
commit 4d33cb2f94
2 changed files with 45 additions and 12 deletions

View File

@@ -840,3 +840,35 @@ issue_4198: {
}
expect_stdout: "PASS"
}
issue_4202: {
options = {
inline: true,
toplevel: true,
}
input: {
{
const o = {};
(function() {
function f() {
o.p = 42;
}
f(f);
})();
console.log(o.p++);
}
}
expect: {
{
const o = {};
(function() {
function f() {
o.p = 42;
}
f(f);
})();
console.log(o.p++);
}
}
expect_stdout: "42"
}