This is now bug https://bugs.ecmascript.org/show_bug.cgi?id=2501
I have updated the working draft to normalize -0 keys to +0 in Map.prototype.set and Set.prototype.add Allen On Feb 4, 2014, at 8:12 AM, Allen Wirfs-Brock wrote: > > On Feb 3, 2014, at 8:51 PM, Vic99999 wrote: > >>> There was a SpiderMonkey bug1, and even a patch, for this for quite a >>> while. The patch now landed and will be in Firefox 29. >> >>> V8 got fixed last week too >>> code.google.com/p/v8/issues/detail?id=3069 >> >> but according to spec, "forEach" should call callback with "-0": >> > > Good catch! This allow applies to 'keys' and 'entries' enumeration. > > I seems to me, that if we want -0 and 0 to act as the same key value, that we > need to normalize -0 to 0 when storing it as a map key. SameValue0 remains > what we want to use when doing a key lookup, > > Allen > > _______________________________________________ > es-discuss mailing list > [email protected] > https://mail.mozilla.org/listinfo/es-discuss >
_______________________________________________ es-discuss mailing list [email protected] https://mail.mozilla.org/listinfo/es-discuss

