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: only initialize unflattened nullable target members when needed #1408

Merged

Conversation

latonz
Copy link
Contributor

@latonz latonz commented Jul 22, 2024

  • Does not initialize a nullable target member with a new object instance if a non-null value was assigned before
  • Maps members in natural order instead of ordering non-null containers before other members

Fixes #640
Replaces #705

@latonz latonz added the bug Something isn't working label Jul 22, 2024
@latonz latonz self-assigned this Jul 22, 2024
@latonz latonz force-pushed the 640-nullable-target-unflattening-initialization branch 2 times, most recently from 518009c to b754503 Compare July 22, 2024 00:57
@latonz latonz force-pushed the 640-nullable-target-unflattening-initialization branch from b754503 to df52c43 Compare August 3, 2024 03:31
@latonz latonz marked this pull request as ready for review August 3, 2024 03:32
@latonz latonz requested a review from ni507 August 3, 2024 03:32
@latonz latonz force-pushed the 640-nullable-target-unflattening-initialization branch from df52c43 to 2e8729f Compare August 3, 2024 14:50
ni507
ni507 previously approved these changes Aug 9, 2024
@latonz latonz force-pushed the 640-nullable-target-unflattening-initialization branch from 2e8729f to 9f7169e Compare August 9, 2024 14:04
@latonz latonz merged commit 496ff27 into riok:main Aug 9, 2024
17 checks passed
@latonz latonz deleted the 640-nullable-target-unflattening-initialization branch August 9, 2024 14:08
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

Successfully merging this pull request may close these issues.

AddNullMemberInitializers should check if a member is assigned before instantiating with ??= new()
2 participants