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

Editorial: fix invalid assertion in Number::lessThan #3169

Merged
merged 1 commit into from
Oct 24, 2023

Conversation

yaphi1
Copy link
Contributor

@yaphi1 yaphi1 commented Sep 9, 2023

This fixes #3108

Problem

Number::lessThan incorrectly asserts that both numbers must be non-zero before being compared for inequality.

Due to this assertion, expressions such as 0 < 1 or -5 < 0 would fail.

Solution

I've removed the mention of non-zero from the assertion.

I hope this edit helps! 😄

Copy link
Member

@michaelficarra michaelficarra left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM. Opened #3174 as a follow-up.

@michaelficarra michaelficarra removed the editor call to be discussed in the next editor call label Sep 14, 2023
@ljharb ljharb requested a review from a team September 14, 2023 21:39
@bakkot bakkot added the ready to merge Editors believe this PR needs no further reviews, and is ready to land. label Oct 22, 2023
@bakkot
Copy link
Contributor

bakkot commented Oct 22, 2023

Note that this should be landed as "Editorial", not "Normative".

@michaelficarra michaelficarra changed the title Normative: fix invalid assertion in Number::lessThan Editorial: fix invalid assertion in Number::lessThan Oct 22, 2023
@ljharb ljharb force-pushed the 3108-fix-lessThan-assertion branch from 20dd5bd to f3f0369 Compare October 23, 2023 04:24
@ljharb

This comment was marked as resolved.

@yaphi1

This comment was marked as resolved.

@ljharb ljharb merged commit f3f0369 into tc39:main Oct 24, 2023
zhangenming pushed a commit to zhangenming/ecma262 that referenced this pull request Dec 22, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
editorial change ready to merge Editors believe this PR needs no further reviews, and is ready to land. spec bug
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Invalid assertion in Number::lessThan
4 participants