fix corner case in dead_code (#4194)

fixes #4193
This commit is contained in:
Alex Lam S.L
2020-10-12 04:09:26 +01:00
committed by GitHub
parent b1b8898e7c
commit 74ff6ce261
2 changed files with 28 additions and 3 deletions

View File

@@ -725,3 +725,25 @@ issue_4191_2: {
}
expect_stdout: "function undefined"
}
issue_4193: {
options = {
dead_code: true,
}
input: {
try {} catch (e) {
var a;
} finally {
const a = 0;
}
console.log(a);
}
expect: {
var a;
{
const a = 0;
}
console.log(a);
}
expect_stdout: true
}