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

To not override ref/out if was modified to same value #1251

Merged
merged 2 commits into from
Apr 1, 2021

Conversation

zvirja
Copy link
Member

@zvirja zvirja commented Mar 30, 2021

Be more strict on detecting whether the boxed struct value was modified. If we find that user rewrote the value to self (or e.g. re-assigned complex struct which has shallow equality), we should not override the value with auto-generated.

Found this issue when was writing tests with intense usage of ref/out.

@aivascu Thank you for the review. It's a small and almost trivial fix, so I don't expect it to break things.

@zvirja zvirja requested a review from aivascu March 30, 2021 17:02
Copy link
Member

@aivascu aivascu left a comment

Choose a reason for hiding this comment

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

LGTM

@zvirja zvirja merged commit 7e26b35 into AutoFixture:master Apr 1, 2021
@zvirja zvirja deleted the fix-nsub-value-rewrite branch April 1, 2021 22:19
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.

None yet

2 participants