fix corner cases in dead_code & if_return (#5525)
fixes #5521 fixes #5522 fixes #5523 fixes #5524
This commit is contained in:
@@ -963,3 +963,57 @@ issue_4374: {
|
||||
}
|
||||
expect_stdout: "0"
|
||||
}
|
||||
|
||||
issue_5521: {
|
||||
options = {
|
||||
if_return: true,
|
||||
}
|
||||
input: {
|
||||
console.log(function() {
|
||||
if (console)
|
||||
try {
|
||||
return "FAIL";
|
||||
} finally {
|
||||
return;
|
||||
}
|
||||
}());
|
||||
}
|
||||
expect: {
|
||||
console.log(function() {
|
||||
if (console)
|
||||
try {
|
||||
return "FAIL";
|
||||
} finally {
|
||||
return;
|
||||
}
|
||||
}());
|
||||
}
|
||||
expect_stdout: "undefined"
|
||||
}
|
||||
|
||||
issue_5523: {
|
||||
options = {
|
||||
if_return: true,
|
||||
}
|
||||
input: {
|
||||
console.log(function() {
|
||||
if (console)
|
||||
try {
|
||||
FAIL;
|
||||
} finally {
|
||||
return;
|
||||
}
|
||||
}());
|
||||
}
|
||||
expect: {
|
||||
console.log(function() {
|
||||
if (console)
|
||||
try {
|
||||
FAIL;
|
||||
} finally {
|
||||
return;
|
||||
}
|
||||
}());
|
||||
}
|
||||
expect_stdout: "undefined"
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user