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

Immutability check does not work with C#9 init-only properties #138

Open
GregoireWulliamoz-eaton opened this issue Jan 17, 2024 · 0 comments

Comments

@GregoireWulliamoz-eaton
Copy link

GregoireWulliamoz-eaton commented Jan 17, 2024

In C#9, init only properties were introduced. It's now heavily used through record. We can consider those properties as immutable.

Unfortunately, this case is not detected through BeImmutable() function.

This feature is not available out of the box in .NET Standard 2.0, 2.1 nor Mono. There is an existing hack to make this feature available but I am worried about how it would behave as a Nuget package.

I would be happy to contribute if you have any proposition to guide me.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant