fix corner case in unused (#5066)

fixes #5065
This commit is contained in:
Alex Lam S.L
2021-07-10 17:43:01 +01:00
committed by GitHub
parent f67dd31cbb
commit aae1fcd12d
2 changed files with 19 additions and 0 deletions

View File

@@ -1874,3 +1874,19 @@ issue_5057_3: {
expect_stdout: "PASS"
node_version: ">=6"
}
issue_5065: {
options = {
pure_getters: "strict",
toplevel: true,
unused: true,
}
input: {
var [ a = console.log("PASS") ] = [ (A = 42).p ];
}
expect: {
var [ a = console.log("PASS") ] = [ (A = 42).p ];
}
expect_stdout: "PASS"
node_version: ">=6"
}