fix corner case in collapse_vars (#4041)

fixes #4040
This commit is contained in:
Alex Lam S.L
2020-08-06 13:30:28 +01:00
committed by GitHub
parent 9b05494ebc
commit a8e286f7e1
2 changed files with 19 additions and 4 deletions

View File

@@ -8375,3 +8375,19 @@ issue_4038: {
}
expect_stdout: "PASS"
}
issue_4040: {
options = {
collapse_vars: true,
toplevel: true,
}
input: {
var a = console.log("PASS") && a.p;
delete NaN;
}
expect: {
var a = console.log("PASS") && a.p;
delete NaN;
}
expect_stdout: "PASS"
}