JetBrains Rider 2026.1 Help

Code inspection: Annotation conflict in hierarchy

This inspection reports a nullability annotation that conflicts with the contract inherited from a base member. It usually means an override, implementation, or inherited member is declaring different nullability than the original API.

Example

using JetBrains.Annotations; class BaseService { [NotNull] public virtual string GetName() => ""; } class DerivedService : BaseService { [CanBeNull] public override string GetName() => null; }
using JetBrains.Annotations; class BaseService { [NotNull] public virtual string GetName() => ""; } class DerivedService : BaseService { public override string GetName() => null; }

Quick-fix

If the conflict comes from a JetBrains nullability attribute, the quick-fix removes the conflicting attribute. If the member should really allow null, the base contract and the whole hierarchy should be updated consistently instead of overriding it in just one place.

01 April 2026