Sign in
webkit
/
WebKit
/
be9b4e2157fc5a81e712f3ea4e4907d0c2890556
/
.
/
JSTests
/
es6
/
RegExp_is_subclassable_correct_prototype_chain.js
blob: b8694148b3b6e662bda2e58e330f80b490071d44 [
file
] [
log
] [
blame
]
function
test
()
{
class
R extends
RegExp
{}
var
r
=
new
R
(
"baz"
,
"g"
);
return
r instanceof R
&&
r instanceof
RegExp
&&
Object
.
getPrototypeOf
(
R
)
===
RegExp
;
}
if
(!
test
())
throw
new
Error
(
"Test failed"
);