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

@@ -6021,3 +6021,20 @@ issue_4823: {
}
expect_stdout: "function"
}
drop_unused_self_reference: {
options = {
pure_getters: "strict",
reduce_vars: true,
toplevel: true,
unused: true,
}
input: {
function f() {}
(f.p = f).q = console.log("PASS");
}
expect: {
console.log("PASS");
}
expect_stdout: "PASS"
}