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 Big Sur v.11.6
Xcode Version 13.0 (13A233)
xcrun version 60.
swift-driver version: 1.26.9 Apple Swift version 5.5 (swiftlang-1300.0.31.1 clang-1300.0.29.1)
Target: x86_64-apple-macosx11.0
Additional Detail from JIRA
Votes
0
Component/s
Foundation, Standard Library
Labels
Bug
Assignee
None
Priority
Medium
md5: 3732c4adf17a27bd2984513e86397863
Issue Description:
Unpredictable behaviour in the case of inserting class instance multiple times in set.
When a set was initialised as shown below then we can get 2 situations:
Fatal error: Duplicate elements of type 'NewClass' were found in a Set.
This usually means either that the type violates Hashable's requirements, or
that members of such a set were mutated after insertion.
When a set was initialised from an array as shown below then we can get numerous situations:
Attachment: Download
Environment
macOS Big Sur v.11.6
Xcode Version 13.0 (13A233)
xcrun version 60.
swift-driver version: 1.26.9 Apple Swift version 5.5 (swiftlang-1300.0.31.1 clang-1300.0.29.1)
Target: x86_64-apple-macosx11.0
Additional Detail from JIRA
md5: 3732c4adf17a27bd2984513e86397863
Issue Description:
Unpredictable behaviour in the case of inserting class instance multiple times in set.
When a set was initialised as shown below then we can get 2 situations:
1) It is all ok and it prints:
[2]
2) Fatal error
When a set was initialised from an array as shown below then we can get numerous situations:
It prints either [3] or [3, 3] or even [3, 3, 3].
I also understand that the changing of class's property that is take place in hash formation is unacceptable.
Attach 2 files with source code and compiled files if needed.
The text was updated successfully, but these errors were encountered: