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