-
Notifications
You must be signed in to change notification settings - Fork 5k
Trim analyzer should warn about assignment to get-only property #93277
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
Comments
The analyzer should basically talk about writing to the property. If it means adapting the message to make it reusable, let's go with that. |
Tagging subscribers to this area: @agocke, @sbomer, @vitek-karas Issue DetailsOpening this to track the follow-up items discussed in dotnet/linker#2728 - see that PR for full context. The analyzer doesn't produce any warnings when assigning to a get-only property, because it doesn't know about the compiler-generated backing field. To fix this we could either:
|
I think that's the right move. It makes the most sense from the C# context. |
Opening this to track the follow-up items discussed in dotnet/linker#2728 - see that PR for full context.
The analyzer doesn't produce any warnings when assigning to a get-only property, because it doesn't know about the compiler-generated backing field. To fix this we could either:
The text was updated successfully, but these errors were encountered: