Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[SR-12810] RangeReplaceableCollection methods should return index ranges. #55257

Open
dabrahams opened this issue May 14, 2020 · 0 comments
Open
Labels
bug A deviation from expected or documented behavior. Also: expected but undesirable behavior. standard library Area: Standard library umbrella

Comments

@dabrahams
Copy link
Collaborator

Previous ID SR-12810
Radar None
Original Reporter @dabrahams
Type Bug
Additional Detail from JIRA
Votes 3
Component/s Standard Library
Labels Bug
Assignee None
Priority Medium

md5: 49bf05f2a1b16da19ed4e0f6e30de387

Issue Description:

If I have a non-bidirectional collection and append an element, I should get back the index of the new element. Basic STL stuff; can't believe I missed it.

The collection has the information, but it just gets dropped. `replaceSubrange` should return the range of indices bounding the modified section of the collection, with all the convenience methods following suit.

I realize making this change backward compatibly might be… tricky. 😉

@swift-ci swift-ci transferred this issue from apple/swift-issues Apr 25, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug A deviation from expected or documented behavior. Also: expected but undesirable behavior. standard library Area: Standard library umbrella
Projects
None yet
Development

No branches or pull requests

1 participant