CA2213 does not recognize an IAsyncDisposable implementaton as sufficient. #4950
Labels
Area-Microsoft.CodeAnalysis.NetAnalyzers
Bug
The product is not behaving according to its current intended design
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: CA2013:
Do not use ReferenceEquals with value types
Analyzer source
SDK: Built-in CA analyzers in .NET 5 SDK or later
Describe the bug
CA2213 seemingly does not consider DisposeAsyncCore method.
Steps To Reproduce
Please see the source code above.
Expected behavior
No warning is emitted when
this.restContext.Dispose();
is called inDisposeAsyncCore
.Actual behavior
A warning is emitted when
this.restContext.Dispose();
is called inDisposeAsyncCore
.The text was updated successfully, but these errors were encountered: