test262 icon indicating copy to clipboard operation
test262 copied to clipboard

Missing tests for map and set treatment of NaN flavors

Open gibson042 opened this issue 3 years ago • 2 comments

Discovered by an XS bug: https://github.com/Moddable-OpenSource/moddable/issues/888

Maps and sets should not differentiate NaN values, such as those from NaN vs. Number("x") vs. Math.sqrt(-1) vs. Infinity * 0.

gibson042 avatar Mar 30 '22 19:03 gibson042

We've had literally the same bug in LibJS (discovered after seeing the XS bug): https://github.com/SerenityOS/serenity/pull/13438 - so +1 for adding some tests for it.

linusg avatar Apr 02 '22 23:04 linusg

@gibson042 I’m thrilled to hear this should be the case. I couldn’t find anywhere in the spec that seemed to mandate this, though. If it is already specified that this is required, perhaps you would be able to answer this question.

[Edit]: realized that the XS bug is about something a bit different: get/has/set not following SameValueZero, not whether or not the side channel exists at all, so maybe this is not the news I’d hoped for.

bathos avatar Apr 20 '22 00:04 bathos