CA2257 should not be reported on nested types #7106
Labels
Bug
The product is not behaving according to its current intended design
False_Positive
A diagnostic is reported for non-problematic case
Analyzer
Diagnostic ID: CA2257:
Members defined on an interface with the 'DynamicInterfaceCastableImplementationAttribute' should be 'static'
Analyzer source
SDK: Built-in CA analyzers in .NET 8 SDK or later
Version: SDK 8.0.100
Describe the bug
The analyzer reports that nested types in a type with
[DynamicInterfaceCastableImplementation]
should be static, but the rationale for that rule does not apply to nested types.Steps To Reproduce
Expected behavior
No diagnostic
Actual behavior
A diagnostic on the class declaration
Additional context
The text was updated successfully, but these errors were encountered: