-
Notifications
You must be signed in to change notification settings - Fork 1.2k
SR-5810: Fix slice data range calculation when inserting/deleting an element #1202
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-5810: Fix slice data range calculation when inserting/deleting an element #1202
Conversation
@swift-ci please test |
Or has swiftlang/swift#11939 rendered this unnecessary? |
The fixes in swiftlang/swift#11939 need porting to this repo. Once that's done I suspect this PR will be obsolete although I'm not certain. @phausler would know for sure. |
Yea, but I will end up merging the tests once I have my patch up: hopefully later today |
Despite the fact that this PR is obsolete, did I do everything correctly? Is it ok to try to fix bugs from JIRA, assign them to me and send the PR or shouldn't I try this again? |
what you did was fine, there was just some underlying issues that were more pervasive than just the issue reported is all. I was working on the other side of it in the overlay and trying to hunt down a good solution for the more general failure. |
thanks @phausler! |
btw I am still going to merge your test (with some modifications) since it is still valid |
Should I reopen the PR with the tests only? |
if you would like, the only alteration is that the starting indexes dont change after mutation now; it follows the same behavior as Array and ArraySlice indexing. so in your first test the startIndex after mutation is 2 not 0 etc... |
Makes sense, I will make it now |
I recreated the bug described in the link below with 2 tests:
https://bugs.swift.org/browse/SR-5810
I found an issue in Data.init(backing: _DataStorage, range: Range) and, it seems like, successfully fixed it.
Please let me know if everything is done properly. Thanks