Sign in
webkit
/
WebKit
/
8438b3acecf76ebd57885118ed5c8bdf9f2fc05e
/
.
/
JSTests
/
es6
/
new.target_assignment_is_an_early_error.js
blob: 1676edf62d1d1f8069a155953853d0ba4de461b6 [
file
] [
log
] [
blame
]
function
test
()
{
var
passed
=
false
;
new
function
f
()
{
passed
=
(
new
.
target
===
f
);
}();
try
{
Function
(
"new.target = function(){};"
);
}
catch
(
e
)
{
return
passed
;
}
}
if
(!
test
())
throw
new
Error
(
"Test failed"
);