Sign in
webkit
/
WebKit
/
49c45f529348e27f11122daecbee33e4fa730919
/
.
/
JSTests
/
es6
/
well-known_symbols_Symbol.species_Array.prototype.filter.js
blob: 3d8e0cafa2e664d8d6616434ac6e35154f5ccc75 [
file
] [
log
] [
blame
]
function
test
()
{
var
obj
=
[];
obj
.
constructor
=
{};
obj
.
constructor
[
Symbol
.
species
]
=
function
()
{
return
{
foo
:
1
};
};
return
Array
.
prototype
.
filter
.
call
(
obj
,
Boolean
).
foo
===
1
;
}
if
(!
test
())
throw
new
Error
(
"Test failed"
);