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

CSC : warning AD0001: Analyzer 'ErrorProne.NET.StructAnalyzers.MakeStructReadOnlyAnalyzer' threw an exception of type 'System.InvalidCastException' with message 'Unable to cast object of type 'Microsoft.CodeAnalysis.CSharp.Syntax.ParameterSyntax' to type 'Microsoft.CodeAnalysis.CSharp.Syntax.BasePropertyDeclarationSyntax'.'. #285

Open
dazerdude opened this issue Jul 5, 2024 · 1 comment

Comments

@dazerdude
Copy link

dazerdude commented Jul 5, 2024

I see this when building. Maybe I'm using some new unsupported .net 8 feature?

10>CSC : warning AD0001: Analyzer 'ErrorProne.NET.StructAnalyzers.MakeStructReadOnlyAnalyzer' threw an exception of type 'System.InvalidCastException' with message 'Unable to cast object of type 'Microsoft.CodeAnalysis.CSharp.Syntax.ParameterSyntax' to type 'Microsoft.CodeAnalysis.CSharp.Syntax.BasePropertyDeclarationSyntax'.'.
10>CSC : warning AD0001: Analyzer 'ErrorProne.NET.StructAnalyzers.MakeStructReadOnlyAnalyzer' threw an exception of type 'System.InvalidCastException' with message 'Unable to cast object of type 'Microsoft.CodeAnalysis.CSharp.Syntax.ParameterSyntax' to type 'Microsoft.CodeAnalysis.CSharp.Syntax.BasePropertyDeclarationSyntax'.'.

Version is 0.6.1-beta.1

@Nixton
Copy link

Nixton commented Aug 23, 2024

Same problem with record struct syntax

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

2 participants