Sign in
webkit
/
WebKit
/
6a59c200745aa2ef26b1e56c44297ddf7c28ff78
/
.
/
JSTests
/
es6
/
Function_is_subclassable_can_be_used_with_new.js
blob: 9c7839870c557f1a46adc3dd379f37ca7b083d3a [
file
] [
log
] [
blame
]
function
test
()
{
class
C extends
Function
{}
var
c
=
new
C
(
"this.bar = 2;"
);
c
.
prototype
.
baz
=
3
;
return
new
c
().
bar
===
2
&&
new
c
().
baz
===
3
;
}
if
(!
test
())
throw
new
Error
(
"Test failed"
);