You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
@jinujoseph This is a CA1806 report. Can you move to dotnet/roslyn-analyzers?
@stephentoub Per your comment (dotnet/runtime#34098 (comment)), you were concerned about using PureAttribute for that purpose. It's currently already the case for CA1806, but the analyzer is missing implicit Add calls for collection initializer. Do you think this should be handled?
It's currently already the case for CA1806, but the analyzer is missing implicit Add calls for collection initializer. Do you think this should be handled?
If CA1806 is already special-casing Pure and it's just buggy in how it's doing so / missing some cases, I'm ok if we want to fix those inconsistencies.
Missing warning when Add method with PureAttiribute used for collection initializer.
Rise warning when C# collection initializer method is marked as Pure.
This warning can help with immutable collections (marking as pure methods like this) to prevent unexpected behaviour.
The text was updated successfully, but these errors were encountered: