ReSharper 2026.1 Help

Code inspection: Subpattern that always matches is redundant

This inspection reports a nested subpattern that always matches and therefore does not add any useful condition. This usually happens when a property or positional subpattern checks a non-nullable value with a pattern such as { }.

Example

if (obj is Settings { Enabled: { } }) { Apply(); }
if (obj is Settings) { Apply(); }

Quick-fix

The quick-fix removes the redundant subpattern.

13 April 2026