Skip to content

[4.0] NSNumber fixes #1254

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

Merged
merged 4 commits into from
Oct 9, 2017

Conversation

ianpartridge
Copy link
Contributor

The four commits in this PR bring across the recent NSNumber fixes to the 4.0 branch. They are:

spevans and others added 4 commits October 9, 2017 10:24
* SR-5803: NSNumber no longer equates 1 and true

- Fix isEqual to work with NSNumbers initialised with different types
  (eg, float and UInt).

- Match the behaviour of Darwin where true can only equal an NSNumber
  with a value of exactly 1.
- When comparing signed/unsigned integers, always compare both
  as SInt128.

- Add special handling for comparing values with Float.nan and
  Double.nan.
@ianpartridge
Copy link
Contributor Author

@swift-ci please test

@ianpartridge ianpartridge merged commit 799351d into swiftlang:swift-4.0-branch Oct 9, 2017
@ianpartridge ianpartridge deleted the nsnumber-4.0 branch October 9, 2017 10:43
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