fix corner case in merge_vars (#4407)

fixes #4406
This commit is contained in:
Alex Lam S.L
2020-12-18 16:52:37 +00:00
committed by GitHub
parent 2415a72e75
commit 44e494f16f
2 changed files with 31 additions and 1 deletions

View File

@@ -567,3 +567,33 @@ issue_4377: {
expect_stdout: "function"
node_version: ">=8"
}
issue_4406: {
options = {
merge_vars: true,
}
input: {
A = "PASS";
B = "FAIL";
(function() {
var a, b;
a = A;
(async function({
[console.log(a)]: {},
}) {})((b = B) && { undefined: b });
})();
}
expect: {
A = "PASS";
B = "FAIL";
(function() {
var a, b;
a = A;
(async function({
[console.log(a)]: {},
}) {})((b = B) && { undefined: b });
})();
}
expect_stdout: "PASS"
node_version: ">=8"
}