Skip to content

fix!: throw from AutoMap.Add() if key exists - #20

Merged
wlsnmrk merged 1 commit into
chickensoft-games:mainfrom
wlsnmrk:fix/throw-from-add-existing-key
Jul 2, 2026
Merged

fix!: throw from AutoMap.Add() if key exists#20
wlsnmrk merged 1 commit into
chickensoft-games:mainfrom
wlsnmrk:fix/throw-from-add-existing-key

Conversation

@wlsnmrk

@wlsnmrk wlsnmrk commented Jul 1, 2026

Copy link
Copy Markdown
Contributor

Breaking change: updated behavior of AutoMap.Perform(AddOp), and therefore AutoMap.Add(), to throw if the provided key already exists in the dictionary. This aligns AutoMap with the documented behavior of the IDictionary interface, which AutoMap implements.

Updated tests to reflect this change.

Breaking change: updated behavior of AutoMap.Perform(AddOp) to throw if
the provided key already exists in the dictionary. This aligns AutoMap
with the documented behavior of the IDictionary interface, which AutoMap
implements.

Updated tests to reflect this change.
@wlsnmrk
wlsnmrk requested review from Bastani and jolexxa July 1, 2026 17:14

@Bastani Bastani left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@wlsnmrk
wlsnmrk merged commit 742e946 into chickensoft-games:main Jul 2, 2026
2 checks passed
@wlsnmrk
wlsnmrk deleted the fix/throw-from-add-existing-key branch July 2, 2026 03:30
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