support new.target (#4746)

fixes #4745
This commit is contained in:
Alex Lam S.L
2021-03-06 23:11:36 +00:00
committed by GitHub
parent ad903e9240
commit c7520b4b97
4 changed files with 55 additions and 1 deletions

View File

@@ -5752,3 +5752,22 @@ issue_4725_2: {
expect_stdout: "PASS"
node_version: ">=4"
}
new_target: {
input: {
console.log(typeof new function() {
return new.target;
}, function() {
return new.target;
}());
}
expect: {
console.log(typeof new function() {
return new.target;
}(), function() {
return new.target;
}());
}
expect_stdout: "function undefined"
node_version: ">=6"
}