Code inspection: Merge negated null/pattern checks into complex pattern
This inspection reports sequential null checks that can be merged into a single negated pattern. For example, a null check followed by member access can be rewritten as one property pattern with not null.
Example
_ = x != null && x.Parent != null;
_ = x is { Parent: not null };
Quick-fix
Merge the sequential checks into a single negated pattern.
30 March 2026