Skip to content

Suppress incorrect CA2257 warnings - #1509

Merged
Sergio Pedri (Sergio0694) merged 1 commit into
staging/AOTfrom
user/sergiopedri/suppress-wrong-ca2257
Feb 21, 2024
Merged

Sergio Pedri (Sergio0694) merged 1 commit into
staging/AOTfrom
user/sergiopedri/suppress-wrong-ca2257

Conversation

@Sergio0694

Copy link
Copy Markdown
Member

This PR suppresses some incorrect CS2257 warnings that were polluting our build output. As per the docs:

"Since a type that implements IDynamicInterfaceCastable may not implement a dynamic interface in metadata, calls to an instance interface member that is not an explicit implementation defined on this type are likely to fail at run time. To avoid run-time errors, mark new interface members static."

This clearly doesn't apply to these cases, since these members were just nested types, and not something you can invoke.

@manodasanW

Copy link
Copy Markdown
Member

Related to dotnet/roslyn-analyzers#7106

@Sergio0694
Sergio Pedri (Sergio0694) merged commit 380d66a into staging/AOT Feb 21, 2024
@Sergio0694
Sergio Pedri (Sergio0694) deleted the user/sergiopedri/suppress-wrong-ca2257 branch February 21, 2024 19:57
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

Successfully merging this pull request may close these issues.

3 participants