SergeyTeplyakov / ErrorProne.NET

Set of roslyn-based analyzers for catching common C# errors (inspired by Google's error-prone)
MIT License
886 stars 42 forks source link

Fix MakeStructReadOnlyanalyzer crash #271

Closed Youssef1313 closed 8 months ago

Youssef1313 commented 8 months ago

When the property symbol comes from a record primary constructor (i.e, associated with ParameterSyntax), the property will have property.IsReadOnly = false, which would avoid the invalid cast to BasePropertyDeclarationSyntax.

SergeyTeplyakov commented 8 months ago

Thanks for the fix!