fix corner case in inline (#5664)

fixes #5662
This commit is contained in:
Alex Lam S.L
2022-09-17 01:54:54 +01:00
committed by GitHub
parent e0b302d651
commit 001f6f9719
3 changed files with 44 additions and 8 deletions

View File

@@ -3586,3 +3586,36 @@ issue_5531_3: {
expect_stdout: "foo"
node_version: ">=16"
}
issue_5662: {
options = {
inline: true,
reduce_vars: true,
}
input: {
console.log(new (function() {
var g = function(a) {
return a;
};
return class {
h(b) {
return g(b);
}
};
}())().h("PASS"));
}
expect: {
console.log(new (function() {
var g = function(a) {
return a;
};
return class {
h(b) {
return g(b);
}
};
}())().h("PASS"));
}
expect_stdout: "PASS"
node_version: ">=6"
}