update es6.spec.symbols instanceof test to reflect Function.prototype[@@hasInstance] being nonwritable #1364

This commit is contained in:
Sebastian McKenzie 2015-04-29 21:20:35 +01:00
parent 616ef8d840
commit d30415d74a

View File

@ -10,9 +10,11 @@ function Greeting(greeting) {
this.greeting = greeting; this.greeting = greeting;
} }
Greeting[Symbol.hasInstance] = function(inst) { Object.defineProperty(Greeting, Symbol.hasInstance, {
return inst.greeting == "hello"; value: function(inst) {
}; return inst.greeting == "hello";
}
});
var a = new Greeting("hello"); var a = new Greeting("hello");
var b = new Greeting("world"); var b = new Greeting("world");