enhance unused (#4858)

This commit is contained in:
Alex Lam S.L
2021-04-22 03:58:50 +01:00
committed by GitHub
parent 3c161a6662
commit bddb5a0102
4 changed files with 61 additions and 9 deletions

View File

@@ -1541,3 +1541,23 @@ issue_4848: {
expect_stdout: "PASS"
node_version: ">=4"
}
drop_unused_self_reference: {
options = {
pure_getters: "strict",
reduce_vars: true,
toplevel: true,
unused: true,
}
input: {
"use strict";
class A {}
(A.p = A).q = console.log("PASS");
}
expect: {
"use strict";
console.log("PASS");
}
expect_stdout: "PASS"
node_version: ">=4"
}