fix corner case in inline (#5141)

fixes #5140
This commit is contained in:
Alex Lam S.L
2021-10-01 23:54:42 +01:00
committed by GitHub
parent 940887f20f
commit 87b99162fb
2 changed files with 32 additions and 1 deletions

View File

@@ -6629,3 +6629,29 @@ issue_5120: {
}
expect_stdout: "PASS"
}
issue_5140: {
options = {
collapse_vars: true,
inline: true,
reduce_vars: true,
toplevel: true,
unused: true,
}
input: {
A = 42;
function f(b) {
return b >> 0;
}
var a = f(42 in []);
console.log(f(A));
}
expect: {
function f(b) {
return b >> 0;
}
A = 42;
console.log(A >> 0);
}
expect_stdout: "42"
}