-
Notifications
You must be signed in to change notification settings - Fork 508
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
Code fix for SA 1202 breaks code #1767
Comments
@Noryoko @hvanbakel How would you recommend this be handled? |
@sharwell I would suggest to leave it like this to be honest. This is just a (hopefully very rare) edge case in my opinion with a public field which could've been encapsulated as a property. |
The code above is interesting. It's almost always a bug to have code like this, and an analyzer could certainly report cases where it occurs. Filed DotNetAnalyzers/Proposals#42. I am concerned about the code fix behavior for the following reasons (which all add up to what looks like a pretty major problem):
|
@hvanbakel pretty common in WPF, not sure you can declare a readonly dependency property without violating it. |
Repro ^
The text was updated successfully, but these errors were encountered: