>> All current engines I could try return Number.prototype for:
>>       12["__proto__"]
>> But the new spec says this should be a TypeError.

> What is the relevant part of the new spec?

In B.2.2.1, step #2 throws a TypeError instead of doing a ToObject.

  get Object.prototype.__proto__ 
  The value of the [[Get]] attribute is a built-in function that requires no 
arguments. It performs the following steps:
  1. Let O be the this value.
  2. If Type(O) is not Object, then throw a TypeError exception.
  3. Return the result of calling the [[GetInheritance]] internal method of O.
 
 
>> It's more consistent with the other members of Object.prototype to do an 
>> implicit ToObject here, and apparently matches existing implementations.  Is 
>> it intentional that the spec is treating this as a TypeError?
 
>> Luke

_______________________________________________
es-discuss mailing list
[email protected]
https://mail.mozilla.org/listinfo/es-discuss

Reply via email to