-
Notifications
You must be signed in to change notification settings - Fork 222
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Fix S2589 FN: Support recursive pattern redundant null check #9203
Comments
Hey, That is a good find. Thanks for raising the issue. PS: FluentAssertions is awesome! |
Thanks for looking into this and for the kind words regarding Fluent Assertions
Yeah, I did think of the many forms recursive patterns can take. |
Description
When using a property pattern
is { }
as a null check S2589 does not recognize it as redundant.Is that a bug or a deliberate design decision?
Repro steps
Expected behavior
E()
should report S2589Actual behavior
E()
does not report S2589Known workarounds
Use
is not null
instead ofis {}
to trigger S2589Related information
The text was updated successfully, but these errors were encountered: