fix corner case in merge_vars (#5320)

fixes #5319
This commit is contained in:
Alex Lam S.L
2022-01-28 08:05:57 +00:00
committed by GitHub
parent e4a91a89e0
commit 18f00457f6
4 changed files with 76 additions and 0 deletions

View File

@@ -1813,3 +1813,33 @@ issue_5260: {
]
node_version: ">=4"
}
issue_5319: {
options = {
collapse_vars: true,
merge_vars: true,
}
input: {
(function(a, c) {
var b = a, c = b;
{
const a = c;
console.log(c());
}
})(function() {
return "PASS";
});
}
expect: {
(function(a, c) {
var b = a, c;
{
const a = c = b;
console.log(c());
}
})(function() {
return "PASS";
});
}
expect_stdout: true
}