JetBrains / JetBrains/resharper-unity

Unable to enforce null-checking pattern

Open
#2,147 2 comments 1 reaction 0 assignees View on GitHub
Dominant language
C#
Stars
1.2k
Forks
142
PR merge metrics
No merged PRs in 30d

Description

I want to use the null-checking pattern `!= null`, however, R# always forces me to use `is { }`:

![2021-08-16_07-59-34](https://user-images.githubusercontent.com/1537591/129517891-ca9d4eb0-2653-461f-b591-6179da21a125.gif)

When looking at the options, this option is nowhere to be found:

![2021-08-16_07-55-52](https://user-images.githubusercontent.com/1537591/129517549-7132dfcc-5907-40b6-bd86-2438e6b3029c.gif)

Is this a bug or is it expected?

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.