fix corner case in dead_code (#4304)

This commit is contained in:
Alex Lam S.L
2020-11-19 00:34:55 +00:00
committed by GitHub
parent db87dcf13e
commit 134ef0b1eb
3 changed files with 39 additions and 1 deletions

View File

@@ -20,6 +20,26 @@ retain_block: {
node_version: ">=4"
}
retain_catch: {
options = {
dead_code: true,
}
input: {
"use strict";
try {} catch (a) {
let a = "aa";
}
}
expect: {
"use strict";
try {} catch (a) {
let a = "aa";
}
}
expect_stdout: true
node_version: ">=4"
}
if_dead_branch: {
options = {
conditionals: true,