-
-
Notifications
You must be signed in to change notification settings - Fork 245
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
Analyzer for limiting the usage of primary class constructor parameters #1286
Comments
The backing field is read-only. Or did you mean something else? |
That's the "okay" code, when you assign the parameter to a read-only field. This is the "not okay" code: ... where the parameter ( |
I'd actually like to be able to use primary constructor arguments in my whole class and would favor a rule telling me to handle them as read-only. |
Allow primary class constructor parameters to only be used to initialize fields/properties, and not inside methods.
Since:
this
qualification everywhere within the class body.Okay:
Not okay:
The text was updated successfully, but these errors were encountered: