Commit Graph

6 Commits

Author SHA1 Message Date
Itai Ferber
5252f3b2f8 Fix NSNumber's custom AnyHashable representation
When we give NSNumber a custom AnyHashable representation, we want to
give it as large a box as possible. When we want to compare it against
other AnyHashable boxes such as Int or UInt, it's always possible to
upcast the Int/UInt to a larger integer size like Int64 or UInt64 for
the comparison. By eliminating the smaller boxes we create, we can
maintain the existing behavior that _SwiftTypePreservingNSNumber gave
us.
2017-07-24 12:22:45 -07:00
Philippe Hausler
c358afe655 [Foundation] Adjust Double and Float bridges to be more lenient 2017-06-16 15:18:27 -07:00
Philippe Hausler
689fc28edc [Foundation] Add migration hints for deprecated NSNumber based initializers 2017-06-16 15:18:27 -07:00
Philippe Hausler
fa39edf6a0 Account for floating point exactly conversions and disable some tests that are caused by SR-4634 2017-04-20 13:34:04 -07:00
Philippe Hausler
d26970e77a Validate the exactly pattern of Double from NSNumber to ensure proper IEEE 754 non lossy conversions 2017-04-17 17:19:20 -07:00
Philippe Hausler
24469a9512 [Foundation] NSNumber bridging and Numeric types (SE-0170) 2017-04-17 15:01:02 -07:00