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 marshalling of classes that override Equals #247

Merged
merged 2 commits into from
Mar 25, 2024

Conversation

jasongin
Copy link
Member

@jasongin jasongin commented Mar 24, 2024

Updates/supersedes PR #156

Class objects are marshalled by reference and therefore must use reference equality in the object map. Previously, a class that overrides Equals() to implement value equality semantics would get confused by the marshaller (object map) with other instances that were value-equal.

Structs are marshalled by value, not tracked in the object map, and do not maintain reference equality after marshalling.

@jasongin jasongin requested a review from vmoroz March 24, 2024 01:08
@DmitriySft
Copy link
Contributor

Thank you for this work. The PR looks good.

@jasongin jasongin merged commit 08c05d5 into main Mar 25, 2024
24 checks passed
@jasongin jasongin deleted the dev/jasongin/class-equality branch March 25, 2024 19:50
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.

3 participants