fix corner case in unused (#5339)

fixes #5338
This commit is contained in:
Alex Lam S.L
2022-02-03 23:13:23 +00:00
committed by GitHub
parent 9a91a7a4dc
commit b106cd9476
3 changed files with 39 additions and 6 deletions

View File

@@ -2006,3 +2006,20 @@ issue_5319: {
expect_stdout: "PASS"
node_version: ">=4"
}
issue_5338: {
options = {
unused: true,
}
input: {
"use strict";
let a = a;
}
expect: {
"use strict";
a;
let a;
}
expect_stdout: ReferenceError("a is not defined")
node_version: ">=4"
}