Skip to content
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

REFL0009 fires when result is checked with 'is not null' #297

Open
manfred-brands opened this issue Apr 1, 2022 · 1 comment
Open

REFL0009 fires when result is checked with 'is not null' #297

manfred-brands opened this issue Apr 1, 2022 · 1 comment

Comments

@manfred-brands
Copy link

GetXAnalyzer.IsNullCheck doesn't recognize is not null.

The first code fragment raises REFL0009:

var property = type.GetProperty(PropertyName);
if (suppressionsProperty is not null)

The second does not:

var property = type.GetProperty(PropertyName);
if (suppressionsProperty != null)
@JohanLarsson
Copy link
Collaborator

Thanks for the issue, the analyzer was written before not was a thing. We must add support

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants