fix corner case in merge_vars (#5452)

fixes #5451
This commit is contained in:
Alex Lam S.L
2022-05-17 19:41:05 +01:00
committed by GitHub
parent cb6dd34b98
commit 63f16e4616
4 changed files with 33 additions and 8 deletions

View File

@@ -3732,3 +3732,25 @@ issue_5420: {
}
expect_stdout: "PASS"
}
issue_5451: {
options = {
merge_vars: true,
toplevel: true,
}
input: {
A = 1;
var a = 1, b;
console.log(function f() {
return a-- && f(b = A, b);
}());
}
expect: {
A = 1;
var a = 1, b;
console.log(function f() {
return a-- && f(b = A, b);
}());
}
expect_stdout: "0"
}