Skip to content

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

@GregoireWulliamoz-eaton

Description

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.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions