Property pattern matching and null-check false-negative

[SQ version :]


I experience an issue which I assume to be considered as a false-positive/false-negative case.
Here follows the results of two successive scans on the same lines of code

In the first one, I think that the scan should not report a bug (csharpsquid:S2259) as the pattern matching avoids any null values in the true branch of the ternary statement. When one developer in our team tried to fix this bug, it legitimately resulted in a code smell (csharpsquid:S4201) because the null check is definetly redudant.

Is there something we can change in our code, or is it something to update on your side?
Many thanks.


Welcome to the community!

We make improvements to the flagship languages in each release. I can’t guarantee it will have an impact, but could you upgrade to 9.3, the latest version, & verify your FP still appears?