Reporter | Thomas Harrison (rolls) |
---|---|
Created | Apr 13, 2018 9:48:58 AM |
Updated | Apr 13, 2018 10:01:55 AM |
Subsystem | Code Analysis - C# |
Assignee | Ivan Serduk (IvanSerduk) |
Priority | Normal |
State | Submitted |
Type | Bug |
Fix version | No Fix versions |
Affected versions | No Affected versions |
Fixed In Version ReSharper | Undefined |
VsVersion | VS 2017 RTM, VS 2017 15.3 |
The nullable reference types preview released here gives incorrect warnings. This feature is planned to be in C# 8.0 so it would be good to get the ball rolling and implement this now.
https://blogs.msdn.microsoft.com/dotnet/2017/11/15/nullable-reference-types-in-csharp/
Example
var test = new NullableTest();
test.NotNull = null; //This is a compile error
public class NullableTest{
public string NotNull = "test";
public string? Nullable = null;
}
https://blogs.msdn.microsoft.com/dotnet/2017/11/15/nullable-reference-types-in-csharp/
Example
var test = new NullableTest();
test.NotNull = null; //This is a compile error
public class NullableTest{
public string NotNull = "test";
public string? Nullable = null;
}