fix corner case in unused (#4682)

fixes #4681
This commit is contained in:
Alex Lam S.L
2021-02-24 18:17:28 +00:00
committed by GitHub
parent a5a958beda
commit b8672b55b2
2 changed files with 33 additions and 0 deletions

View File

@@ -572,3 +572,27 @@ computed_key_generator: {
expect_stdout: "PASS"
node_version: ">=4"
}
issue_4681: {
options = {
unused: true,
}
input: {
console.log(function(a) {
class A {
static p = a = this;
}
return typeof a;
}());
}
expect: {
console.log(function(a) {
class A {
static p = a = this;
}
return typeof a;
}());
}
expect_stdout: "function"
node_version: ">=12"
}