Merge branch 'master' into harmony-v3.0.14

This commit is contained in:
alexlamsl
2017-05-31 11:42:54 +08:00
6 changed files with 90 additions and 62 deletions

View File

@@ -245,3 +245,25 @@ hoist_funs_strict: {
]
node_version: ">=4"
}
issue_203: {
options = {
keep_fargs: false,
side_effects: true,
unsafe_Func: true,
unused: true,
}
input: {
var m = {};
var fn = Function("require", "module", "exports", "module.exports = 42;");
fn(null, m, m.exports);
console.log(m.exports);
}
expect: {
var m = {};
var fn = Function("a", "b", "b.exports=42");
fn(null, m, m.exports);
console.log(m.exports);
}
expect_stdout: "42"
}