fix missing corner case in #2855 (#2868)

This commit is contained in:
Alex Lam S.L
2018-02-02 18:08:56 +08:00
committed by GitHub
parent 334b07a3db
commit b16380d669
2 changed files with 29 additions and 3 deletions

View File

@@ -4191,6 +4191,31 @@ return_3: {
expect_stdout: "0"
}
return_4: {
options = {
collapse_vars: true,
}
input: {
var a = "FAIL";
(function(b) {
a = "PASS";
return;
b(a);
})();
console.log(a);
}
expect: {
var a = "FAIL";
(function(b) {
a = "PASS";
return;
b(a);
})();
console.log(a);
}
expect_stdout: "PASS"
}
issue_2858: {
options = {
collapse_vars: true,