You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
macOS:
Apple Swift version 5.0.1 (swiftlang-1001.0.82.4 clang-1001.0.46.5)
Target: x86_64-apple-darwin18.7.0
Linux:
Swift version 5.0.3 (swift-5.0.3-RELEASE)
Target: x86_64-unknown-linux-gnu
Additional Detail from JIRA
Votes
0
Component/s
Foundation
Labels
Bug
Assignee
None
Priority
Medium
md5: 55c09c1855ce9e6643cbd9ab1f414b26
Issue Description:
Snippet:
import Foundation let a = NSNumber(0) let b = NSNumber(false) let c = (a == b) let d = (AnyHashable(a) == AnyHashable(b))
On macOS we get c = true, d = false.
On Linux we get c = true, d = true.
I don’t know who is right.
It feels to me (a == b) (and it’s AnyHashable variant) should both be false because the numbers were not created with the same type.
The text was updated successfully, but these errors were encountered:
Environment
macOS:
Apple Swift version 5.0.1 (swiftlang-1001.0.82.4 clang-1001.0.46.5)
Target: x86_64-apple-darwin18.7.0
Linux:
Swift version 5.0.3 (swift-5.0.3-RELEASE)
Target: x86_64-unknown-linux-gnu
Additional Detail from JIRA
md5: 55c09c1855ce9e6643cbd9ab1f414b26
Issue Description:
Snippet:
import Foundation
let a = NSNumber(0)
let b = NSNumber(false)
let c = (a == b)
let d = (AnyHashable(a) == AnyHashable(b))
On macOS we get c = true, d = false.
On Linux we get c = true, d = true.
I don’t know who is right.
It feels to me (a == b) (and it’s AnyHashable variant) should both be false because the numbers were not created with the same type.
The text was updated successfully, but these errors were encountered: