-
Notifications
You must be signed in to change notification settings - Fork 5.3k
Propagate DynamicallyAccessedMembers annotations to auto-properties only #119329
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
Merged
jtschuster
merged 27 commits into
dotnet:main
from
jtschuster:AutoPropertyBackingFieldOnly
Sep 5, 2025
Merged
Changes from all commits
Commits
Show all changes
27 commits
Select commit
Hold shift + click to select a range
7916a6f
Add more issue links for ExpectedWarnings that don't match
jtschuster 6ae6439
Merge branch 'main' of https://github.com/jtschuster/runtime into Tri…
jtschuster cdb4208
Add reason for IL3XXX warnings with no trimmer warning as AOT-specific
jtschuster aa375ce
Merge branch 'main' of https://github.com/dotnet/runtime into TrimWar…
jtschuster 86f8bb0
Add visitor for IInvalidOperation for 'field' references
jtschuster c6d1ebd
Add GetBackingFieldTargetValue overload for IFieldSymbol
jtschuster 5a7d9f9
Merge branch 'main' into FieldKeywordTrimAnalyzer
jtschuster c4d6c59
Undo ExpectedWarning links
jtschuster 001cd13
Undo PropertyDataFlow changes
jtschuster 2eef11c
Use preview C# version in ilc test compiler
jtschuster 1009e16
Root the properties so warnings show up
jtschuster 744737f
Update test code to validate kept items, check for identical field re…
jtschuster 6f86328
Don't warn on backing field reflection in analyzer
jtschuster c29f30f
Recognize a backing field when it is referenced twice in an accessor …
jtschuster a33135d
Update tests to use Preview LangVersion, remove unnecessary visit
jtschuster 786a922
Clean up code and add issue link for NAOT warning
jtschuster b0aa149
Merge branch 'main' of https://github.com/dotnet/runtime into FieldKe…
jtschuster 2ec7761
Refactor field access checks and update tests for Preview LangVersion
jtschuster a24418f
PR Feedback: We should be warning on reflection access to backing field
jtschuster e2d369d
Revert extra changes
jtschuster a00b6c1
Merge branch 'main' into FieldKeywordTrimAnalyzer
jtschuster 3d05f42
Revert allowance for multiple reads/writes to the same field, update …
jtschuster 5b1f7b1
Don't propagate annotation to backing field in analyzer
jtschuster 51a41b2
Tighten heuristic for backing field finding to only work on auto-prop…
jtschuster 06d659c
Propagate annotation if a single accessor is auto
jtschuster 0c76bdb
Propagate annotations for auto-property in analyzer
jtschuster 33eeb93
Simplify checks and add tests for missing case
jtschuster File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.