fix corner case in merge_vars (#4289)

fixes #4288
This commit is contained in:
Alex Lam S.L
2020-11-17 20:03:20 +00:00
committed by GitHub
parent 383163afa6
commit caa92aea5d
3 changed files with 48 additions and 8 deletions

View File

@@ -1440,3 +1440,33 @@ issue_4286_2: {
expect_stdout: "PASS"
node_version: ">=6"
}
issue_4288: {
options = {
merge_vars: true,
}
input: {
function f({
[new function() {
console.log(typeof b);
}()]: a,
}) {
var b = a;
b++;
}
f(0);
}
expect: {
function f({
[new function() {
console.log(typeof b);
}()]: a,
}) {
var b = a;
b++;
}
f(0);
}
expect_stdout: "undefined"
node_version: ">=6"
}