mirror of
https://github.com/apple/swift-collections
synced 2026-11-25 04:37:48 +00:00
SortedSet's set operations only accepted another SortedSet, so SortedSet([1, 2]).union(0 ..< 10) did not compile and the type could not conform to SetAPIChecker. Add the customary Sequence generalizations for all 13 operations, keeping the existing Self overloads as the fast path (concrete beats generic in overload resolution). Arbitrary sequences fall back through a temporary SortedSet or, for the membership predicates, allSatisfy. Fixes #743. Signed-off-by: Aniket <aniketkomailkro@gmail.com>