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: Respect AllowNullPropertyAssignment correctly when mapping code is not a direct assignment #939

Merged
merged 1 commit into from
Nov 28, 2023
Merged

fix: Respect AllowNullPropertyAssignment correctly when mapping code is not a direct assignment #939

merged 1 commit into from
Nov 28, 2023

Conversation

latonz
Copy link
Contributor

@latonz latonz commented Nov 22, 2023

Respect AllowNullPropertyAssignment correctly when mapping code is not a direct assignment

Description

If AllowNullPropertyAssignment is true, respect it correctly (set target members to null) if the mapping for the property is not accepting null values and is not synthetic.

This could have a big impact, we should probably release this as breaking change 🤔
Fixes #803

Checklist

  • The existing code style is followed
  • The commit message follows our guidelines
  • Performed a self-review of my code
  • Hard-to-understand areas of my code are commented
  • The documentation is updated (as applicable)
  • Unit tests are added/updated
  • Integration tests are added/updated (as applicable, especially if feature/bug depends on roslyn or framework version in use)

@latonz latonz self-assigned this Nov 22, 2023
Copy link

codecov bot commented Nov 22, 2023

Codecov Report

All modified and coverable lines are covered by tests ✅

Comparison is base (825a853) 91.23% compared to head (8d28c9c) 91.24%.

Additional details and impacted files
@@            Coverage Diff             @@
##             main     #939      +/-   ##
==========================================
+ Coverage   91.23%   91.24%   +0.01%     
==========================================
  Files         222      222              
  Lines        7085     7097      +12     
  Branches      895      897       +2     
==========================================
+ Hits         6464     6476      +12     
  Misses        411      411              
  Partials      210      210              

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@latonz latonz marked this pull request as ready for review November 24, 2023 10:01
@latonz latonz enabled auto-merge (squash) November 28, 2023 09:01
@latonz latonz merged commit cac2f2e into riok:main Nov 28, 2023
19 checks passed
@latonz latonz deleted the 803-allow-set-nullable-set-to-null branch November 28, 2023 09:04
Copy link

🎉 This PR is included in version 3.3.0-next.5 🎉

The release is available on:

Your semantic-release bot 📦🚀

Copy link

🎉 This PR is included in version 3.3.0 🎉

The release is available on:

Your semantic-release bot 📦🚀

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.

AllowNullPropertyAssignment not respected when mapping from float? to decimal?
2 participants