[SR-14850] MutableCollection gives wrong Subsequence type to implementor #57197
Labels
bug
A deviation from expected or documented behavior. Also: expected but undesirable behavior.
standard library
Area: Standard library umbrella
Attachment: Download
Environment
swift-driver version: 1.26 Apple Swift version 5.5 (swiftlang-1300.0.20.104 clang-1300.0.21.1)
Target: arm64-apple-macosx11.0
Additional Detail from JIRA
md5: 6b025e063944499abb3a144e2e308b4a
Issue Description:
MutableCollection has its Range subscript requirement:
It has an unconditional default implementation with this signature:
However, if a type has a Subsequence different than that it can accidentally pick up this default implementation. The following compiles and runs:
The default implementation on `MutableCollection` should have been defined under the condition where `SubSequence == Slice<Self>`.
The text was updated successfully, but these errors were encountered: