False positive for CA2225 when a base class already has the method defined #6640
Labels
Area-Microsoft.CodeAnalysis.NetAnalyzers
Bug
The product is not behaving according to its current intended design
Category-Usage
False_Positive
A diagnostic is reported for non-problematic case
help wanted
The issue is up-for-grabs, and can be claimed by commenting
Milestone
Analyzer
Diagnostic ID: CA2225:
Operator overloads have named alternates
Analyzer source
SDK: Built-in CA analyzers in .NET 7 SDK or later
Version: SDK 7.0.302
Describe the bug
CA2225 is triggered even though the requested method is defined and publicly available on the base class.
Steps To Reproduce
Expected behavior
A.ToBoolean()
should be found by the analyzer as a candidate method.Actual behavior
A.ToBoolean()
is not considered when checking if B has an implementation for the requested methodsThe text was updated successfully, but these errors were encountered: