Brightspace / D2L.CodeStyle

Annotations and analysis tools for D2L C# code style
Apache License 2.0
10 stars 22 forks source link

enforce immutable type params during immutability analysis #874

Open omsmith opened 2 years ago

omsmith commented 2 years ago

Decide a type is not immutable if any [Immutable] type parameters to do satisfy that constraint during immutable type analysis.

Previously we would assume a different section of the analyzer caught these, as we look at arguments to these type parameters specifically even outside of actual immutable type analysis.

Checking during actual immutable type analysis means we don't miss it when it really matters, in case we did otherwise.