S2589 FP: Rule is erroneously raised on var-type pattern matches that use when clauses #8011
Labels
Area: C#
C# rules related issues.
Area: CFG/SE
CFG and SE related issues.
Type: CFG/SE FPs
Rule IS triggered when it shouldn't be for CFG and SE rules.
Milestone
Description
S2589 is erroneously raised on
var
-type pattern matches in e.g. switch expressions that implement the condition using awhen
clause.Repro steps
Expected behavior
Rule S2589 is not raised.
Actual behavior
Rule S2589 is raised on both
var value when
pattern matches.Known workarounds
Disable or suppress S2589.
Related information
The text was updated successfully, but these errors were encountered: