update es6.spec.symbols instanceof test to reflect Function.prototype[@@hasInstance] being nonwritable #1364
This commit is contained in:
parent
616ef8d840
commit
d30415d74a
@ -10,9 +10,11 @@ function Greeting(greeting) {
|
||||
this.greeting = greeting;
|
||||
}
|
||||
|
||||
Greeting[Symbol.hasInstance] = function(inst) {
|
||||
return inst.greeting == "hello";
|
||||
};
|
||||
Object.defineProperty(Greeting, Symbol.hasInstance, {
|
||||
value: function(inst) {
|
||||
return inst.greeting == "hello";
|
||||
}
|
||||
});
|
||||
|
||||
var a = new Greeting("hello");
|
||||
var b = new Greeting("world");
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user