fix corner case in unused (#3674)

fixes #3673
This commit is contained in:
Alex Lam S.L
2020-01-07 20:06:25 +08:00
committed by GitHub
parent 4d6771b9b1
commit f5ceff6e4b
2 changed files with 21 additions and 1 deletions

View File

@@ -2355,3 +2355,23 @@ issue_3664: {
}
expect_stdout: "PASS"
}
issue_3673: {
options = {
pure_getters: "strict",
side_effects: true,
toplevel: true,
unused: true,
}
input: {
var a;
(a = [ a ]).p = 42;
console.log("PASS");
}
expect: {
var a;
(a = [ a ]).p = 42;
console.log("PASS");
}
expect_stdout: "PASS"
}