Merge branch 'master' into harmony-v3.3.6

This commit is contained in:
alexlamsl
2018-01-13 13:53:31 +08:00
13 changed files with 636 additions and 164 deletions

View File

@@ -1128,3 +1128,32 @@ issue_2701: {
}
expect_stdout: "function"
}
issue_2749: {
options = {
dead_code: true,
inline: true,
toplevel: true,
unused: true,
}
input: {
var a = 2, c = "PASS";
while (a--)
(function() {
return b ? c = "FAIL" : b = 1;
try {
} catch (b) {
var b;
}
})();
console.log(c);
}
expect: {
var a = 2, c = "PASS";
while (a--)
b = void 0, b ? c = "FAIL" : b = 1;
var b;
console.log(c);
}
expect_stdout: "PASS"
}