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

cs readOnly with final warning #10421

Closed
lublak opened this issue Oct 7, 2021 · 0 comments · Fixed by #11551
Closed

cs readOnly with final warning #10421

lublak opened this issue Oct 7, 2021 · 0 comments · Fixed by #11551
Labels
bug platform-cs Everything related to c#
Milestone

Comments

@lublak
Copy link
Contributor

lublak commented Oct 7, 2021

Currently you get a warning if you declare a variable with @:readOnly: Warning : @:readOnly variable declared without never setter modifier also if you make the variable to final.
If you look into the doc of c# you can see that it is possible to set a readonly variable in the constructor: https://docs.microsoft.com/en-us/dotnet/csharp/language-reference/keywords/readonly

@lublak lublak changed the title cs readOnly with final cs readOnly with final warning Oct 7, 2021
@RealyUniqueName RealyUniqueName added this to the Bugs milestone Oct 25, 2021
@RealyUniqueName RealyUniqueName added bug platform-cs Everything related to c# labels Oct 25, 2021
@Simn Simn modified the milestones: Bugs, Later Mar 24, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug platform-cs Everything related to c#
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants