fix corner case in evaluate (#3904)

fixes #3903
This commit is contained in:
Alex Lam S.L
2020-05-17 15:25:13 +01:00
committed by GitHub
parent a00f8dade7
commit 48b62393a4
2 changed files with 31 additions and 1 deletions

View File

@@ -2418,3 +2418,29 @@ issue_3887: {
}
expect_stdout: "PASS"
}
issue_3903: {
options = {
evaluate: true,
reduce_vars: true,
toplevel: true,
unused: true,
}
input: {
var a = "PASS";
function f(b, c) {
return console, c;
}
var d = f(f(), a = a);
console.log(d);
}
expect: {
var a = "PASS";
function f(b, c) {
return console, c;
}
var d = f(f(), a = a);
console.log(d);
}
expect_stdout: "PASS"
}