haikuwebkit/JSTests/es6/__proto___in_object_literal...

14 lines
205 B
JavaScript

function test() {
if (!({ __proto__ : [] } instanceof Array)) {
return false;
}
var a = "__proto__";
return !({ [a] : [] } instanceof Array);
}
if (!test())
throw new Error("Test failed");