False positive CA1508 with Parallel.Invoke #7534
Labels
Area-Microsoft.CodeAnalysis.NetAnalyzers
False_Positive
A diagnostic is reported for non-problematic case
Milestone
Description
The code given above triggers the following warning:
CA1508 'myAwesomeName is not null' is always 'false'. Remove or refactor the condition(s) to avoid dead code.
But ideally speaking, the given code should not trigger
CA1508
because at the point we check the value of the object, it can have a non-null value.Reproduction Steps
<AnalysisLevel>9-all</AnalysisLevel>
to the csproj fileDescription
sectionExpected behavior
CA1508
shouldn't get triggered because at the point we check the value of the object, it can have a non-null value.Actual behavior
CA1508
is being triggeredRegression?
No response
Known Workarounds
No response
Configuration
.NET 9
Other information
No response
The text was updated successfully, but these errors were encountered: