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

Fix subscript setter #66

Merged
merged 1 commit into from
Apr 25, 2024
Merged

Fix subscript setter #66

merged 1 commit into from
Apr 25, 2024

Conversation

stephencelis
Copy link
Member

The set/modify of identifiedArray[n] both assume an in-place replacement of the same identity. This makes sense for _modify, but not set, which can replace a value with one that has a totally new identity.

The `set`/`modify` of `identifiedArray[n]` both assume an in-place
replacement of the same identity. This makes sense for `_modify`, but
not `set`, which can replace a value with one that has a totally new
identity.
@stephencelis stephencelis merged commit 2481e39 into main Apr 25, 2024
4 checks passed
@stephencelis stephencelis deleted the fix-position-subscript-setter branch April 25, 2024 16:04
stephencelis added a commit that referenced this pull request May 13, 2024
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.
stephencelis added a commit that referenced this pull request May 17, 2024
* 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
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants