Sign in
webkit
/
WebKit
/
fd10f760421d170d3c112a898afd0d8277e3af75
/
.
/
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"
);