Resharper version = 2020.2.1
Consider the following code from a .Net Core 3.1 console application:
static void Main()
Test test = new Test
SomeProperty = null // R# warning: Possible null assignment.
public sealed class Test
public string SomeProperty
get => _someProperty;
value != null // R# warning: Expression is always true.
string _someProperty = "";
The [AllowNull] attribute tells the compiler that although the SomeProperty getter cannot return null,
the setter can accept null.
The C# compiler is happy with this, and does not issue any warnings or errors.
However, Resharper gives two incorrect warnings, as commented in the code above
("// R# warning: ...").
Is this a problem with Resharper, or have I configured Resharper incorrectly?