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
Since the release 1.0.1, sorting an identified array using a KeyPathComparator fails when it internally accesses the subscript. It was previously working on v1.0.0
Checklist
If possible, I've reproduced the issue using the main branch of this package.
It crashes when it hits the precondition in the subscript (we removed an element, but its id can already be found elsewhere in the array we're working on).
Steps to reproduce
The following test should pass (and passes on v1.0.0):
PR #66 fixed one issue but introduced a regression. This PR changes the
subscript setter to do a `swap` when identity of elements match
something that already exists in the collection.
I've also stubbed out a fake property testing suite that can hopefully
be expanded with more operations soon.
Fixes#69.
* Fix subscript set operation
PR #66 fixed one issue but introduced a regression. This PR changes the
subscript setter to do a `swap` when identity of elements match
something that already exists in the collection.
I've also stubbed out a fake property testing suite that can hopefully
be expanded with more operations soon.
Fixes#69.
* wip
* wip
* wip
* wip
Description
Since the release 1.0.1, sorting an identified array using a
KeyPathComparator
fails when it internally accesses the subscript. It was previously working on v1.0.0Checklist
main
branch of this package.Expected behavior
Actual behavior
It crashes when it hits the precondition in the subscript (we removed an element, but its id can already be found elsewhere in the array we're working on).
Steps to reproduce
The following test should pass (and passes on v1.0.0):
Note that sorting using the closure comparison works.
Identified Collections version information
1.0.1
Destination operating system
iOS 17
Xcode version information
Version 15.3 (15E5202a)
Swift Compiler version information
The text was updated successfully, but these errors were encountered: