[SR-12091] AnyHashable changes hashValue of floating-point numbers #54527
Labels
bug
A deviation from expected or documented behavior. Also: expected but undesirable behavior.
standard library
Area: Standard library umbrella
Environment
• Swift 5.1.3 (swiftlang-1100.0.282.1 clang-1100.0.33.15)
• MacOS 10.14.6 (18G103)
I observe the same results in both:
• Xcode 11.3.1 playground for MacOS
• Swift REPL in Terminal
Additional Detail from JIRA
md5: f2c77ce20074961f74e964f514ed3697
Issue Description:
My understanding is that
AnyHashable
should preserve thehashValue
of what it wraps. However, this does not hold for floating-point values which represent an integer in the range-0x1p63..<0x1p64
:The text was updated successfully, but these errors were encountered: