enhance dead_code (#3551)

This commit is contained in:
Alex Lam S.L
2019-10-30 06:34:54 +08:00
committed by GitHub
parent 0f4cfa877a
commit f1eb03f2c0
3 changed files with 95 additions and 17 deletions

View File

@@ -1013,3 +1013,32 @@ issue_3406: {
}
expect_stdout: "true"
}
function_assign: {
options = {
dead_code: true,
}
input: {
console.log(function() {
var a = "PASS";
function h(c) {
return c;
}
h.p = function(b) {
return b;
}.p = a;
return h;
}().p);
}
expect: {
console.log(function() {
var a = "PASS";
function h(c) {
return c;
}
h.p = a;
return h;
}().p);
}
expect_stdout: "PASS"
}