@@ -2982,3 +2982,27 @@ issue_5493: {
|
||||
expect_stdout: "undefined"
|
||||
node_version: ">=8"
|
||||
}
|
||||
|
||||
issue_5506: {
|
||||
options = {
|
||||
dead_code: true,
|
||||
}
|
||||
input: {
|
||||
console.log(function(a) {
|
||||
(async function() {
|
||||
a = null in (a = "PASS");
|
||||
})();
|
||||
return a;
|
||||
}("FAIL"));
|
||||
}
|
||||
expect: {
|
||||
console.log(function(a) {
|
||||
(async function() {
|
||||
a = null in (a = "PASS");
|
||||
})();
|
||||
return a;
|
||||
}("FAIL"));
|
||||
}
|
||||
expect_stdout: "PASS"
|
||||
node_version: ">=8"
|
||||
}
|
||||
|
||||
@@ -1669,3 +1669,41 @@ issue_5106_2: {
|
||||
}
|
||||
expect_stdout: "PASS"
|
||||
}
|
||||
|
||||
issue_5506: {
|
||||
options = {
|
||||
dead_code: true,
|
||||
}
|
||||
input: {
|
||||
try {
|
||||
(function(a) {
|
||||
var b = 1;
|
||||
(function f() {
|
||||
try {
|
||||
b-- && f();
|
||||
} catch (c) {}
|
||||
console.log(a);
|
||||
a = 42 in (a = "bar");
|
||||
})();
|
||||
})("foo");
|
||||
} catch (e) {}
|
||||
}
|
||||
expect: {
|
||||
try {
|
||||
(function(a) {
|
||||
var b = 1;
|
||||
(function f() {
|
||||
try {
|
||||
b-- && f();
|
||||
} catch (c) {}
|
||||
console.log(a);
|
||||
a = 42 in (a = "bar");
|
||||
})();
|
||||
})("foo");
|
||||
} catch (e) {}
|
||||
}
|
||||
expect_stdout: [
|
||||
"foo",
|
||||
"bar",
|
||||
]
|
||||
}
|
||||
|
||||
@@ -1515,3 +1515,35 @@ issue_5456: {
|
||||
expect_stdout: "foo"
|
||||
node_version: ">=4"
|
||||
}
|
||||
|
||||
issue_5506: {
|
||||
options = {
|
||||
dead_code: true,
|
||||
}
|
||||
input: {
|
||||
console.log(function(a) {
|
||||
var b = function*() {
|
||||
a = null in (a = "PASS");
|
||||
}();
|
||||
try {
|
||||
b.next();
|
||||
} catch (e) {
|
||||
return a;
|
||||
}
|
||||
}("FAIL"));
|
||||
}
|
||||
expect: {
|
||||
console.log(function(a) {
|
||||
var b = function*() {
|
||||
a = null in (a = "PASS");
|
||||
}();
|
||||
try {
|
||||
b.next();
|
||||
} catch (e) {
|
||||
return a;
|
||||
}
|
||||
}("FAIL"));
|
||||
}
|
||||
expect_stdout: "PASS"
|
||||
node_version: ">=4"
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user