enhance dead_code (#3849)

This commit is contained in:
Alex Lam S.L
2020-05-05 22:02:35 +01:00
committed by GitHub
parent 66ab2df97f
commit 34ead0430b
2 changed files with 22 additions and 0 deletions

View File

@@ -1151,3 +1151,20 @@ issue_3830_6: {
}
expect_stdout: "PASS"
}
redundant_assignments: {
options = {
dead_code: true,
}
input: {
var a = a = "PASS", b = "FAIL";
b = b = "PASS";
console.log(a, b);
}
expect: {
var a = "PASS", b = "FAIL";
b = "PASS";
console.log(a, b);
}
expect_stdout: "PASS PASS"
}