fix corner case in unused (#3499)

fixes #3497
This commit is contained in:
Alex Lam S.L
2019-10-18 20:08:05 +08:00
committed by GitHub
parent cd072317d0
commit 0201cb4b52
2 changed files with 36 additions and 7 deletions

View File

@@ -2081,3 +2081,24 @@ issue_3495: {
}
expect_stdout: "undefined"
}
issue_3497: {
options = {
pure_getters: "strict",
side_effects: true,
unused: true,
}
input: {
var a;
console.log(function(b) {
(b += a).p = 0;
}());
}
expect: {
var a;
console.log(function(b) {
(b += a).p = 0;
}());
}
expect_stdout: "undefined"
}