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

ToPrimitive called without hint for boolean equality #1281

Merged
merged 1 commit into from
Oct 16, 2017

Conversation

cxielarko
Copy link
Contributor

For non-strict equality, an object compared to a boolean should be coerced using ToPrimitive with no hint argument. (A "number" hint was used in an earlier version of the BigInt proposal, before this commit.)

Copy link
Member

@littledan littledan left a comment

Choose a reason for hiding this comment

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

Good catch identifying this gap. I think we'd benefit from more tests in this area, e.g., that no hint is provided for +, that the hint is "number" for -, etc.

@littledan littledan merged commit 772fb79 into tc39:master Oct 16, 2017
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

Successfully merging this pull request may close these issues.

2 participants