Merge branch 'master' into harmony-v3.3.9

This commit is contained in:
alexlamsl
2018-01-27 20:58:49 +08:00
6 changed files with 86 additions and 5 deletions

View File

@@ -2066,3 +2066,30 @@ issue_2768: {
}
expect_stdout: "PASS undefined"
}
issue_2846: {
options = {
collapse_vars: true,
reduce_vars: true,
toplevel: true,
unused: true,
}
input: {
function f(a, b) {
var a = 0;
b && b(a);
return a++;
}
var c = f();
console.log(c);
}
expect: {
var c = function(a, b) {
a = 0;
b && b(a);
return a++;
}();
console.log(c);
}
expect_stdout: "0"
}