fix corner cases in inline (#5241)

fixes #5239
fixes #5240
This commit is contained in:
Alex Lam S.L
2021-12-26 08:39:06 +08:00
committed by GitHub
parent e1013bd56d
commit 835d130ccf
3 changed files with 169 additions and 8 deletions

View File

@@ -1747,3 +1747,48 @@ issue_4985: {
expect_stdout: "undefined"
node_version: ">=4"
}
issue_5240: {
options = {
inline: true,
}
input: {
"use strict";
function f() {
if (console) {
let g = function() {
e;
}, e;
(function() {
if (console) {
console.log(e);
var e = "FAIL";
}
})(console.log(e));
}
}
f();
}
expect: {
"use strict";
function f() {
if (console) {
let g = function() {
e;
}, e;
(function() {
if (console) {
console.log(e);
var e = "FAIL";
}
})(console.log(e));
}
}
f();
}
expect_stdout: [
"undefined",
"undefined",
]
node_version: ">=4"
}