fix corner case in merge_vars (#5657)

fixes #5656
This commit is contained in:
Alex Lam S.L
2022-09-09 21:14:33 +01:00
committed by GitHub
parent 9dec612cd5
commit 88dfc49683
2 changed files with 30 additions and 3 deletions

View File

@@ -2144,3 +2144,28 @@ issue_5591: {
]
node_version: ">=4"
}
issue_5656: {
options = {
collapse_vars: true,
merge_vars: true,
}
input: {
console.log(function(a) {
var b = a;
b++;
{
const a = b;
}
}());
}
expect: {
console.log(function(a) {
var b = a;
{
const a = ++b;
}
}());
}
expect_stdout: true
}