Open stephentoub opened 1 year ago
Version Used: https://github.com/dotnet/roslyn/commit/07c6b71f9d061a28296b5c6791c4f60014356784
Steps to Reproduce: SharpLab
#pragma warning disable 8500 using System.Diagnostics; public unsafe class C { public string M(Data* data) { Debug.Assert(data->Value is not null); return data->Value; } } public struct Data { public string? Value; }
Expected Behavior:
No warning.
Actual Behavior:
warning CS8603: Possible null reference return.
I think fixing this would require us to treat the pointed-at variable as a child slot of the pointer variable.
Version Used: https://github.com/dotnet/roslyn/commit/07c6b71f9d061a28296b5c6791c4f60014356784
Steps to Reproduce: SharpLab
Expected Behavior:
No warning.
Actual Behavior:
warning CS8603: Possible null reference return.