Is the informative definition of [[Enumerate]] buggy?
Raul-Sebastian Mihăilă
raul.mihaila at gmail.com
Wed Aug 26 18:03:26 UTC 2015
In 9.1.11. it's specified that the iterator returned by the [[Enumerate]]
method iterates over String-valued keys. But the informative definition at
the end of 9.1.11. is based on whatever is returned by calling
Reflect.enumerate on the prototype of the current object, assuming that
there is such a prototype.
If the prototype is a proxy and it's enumerate trap returns an iterator
that yields other kind of values than strings, then our original object's
[[Enumerate]] method will give us non-string keys as well. And they can be
any kind of values, not only symbols.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.mozilla.org/pipermail/es-discuss/attachments/20150826/a7415ffb/attachment.html>
More information about the es-discuss
mailing list