Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Missing tests for map and set treatment of NaN flavors #3454

Open
gibson042 opened this issue Mar 30, 2022 · 2 comments
Open

Missing tests for map and set treatment of NaN flavors #3454

gibson042 opened this issue Mar 30, 2022 · 2 comments

Comments

@gibson042
Copy link
Contributor

Discovered by an XS bug: Moddable-OpenSource/moddable#888

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

@linusg
Copy link
Member

linusg commented Apr 2, 2022

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

@bathos
Copy link

bathos commented Apr 20, 2022

@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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants