You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Currently, both null coalescing assignment and nullable reference types are available together in Visual Studio 19 Preview 1. However, I don't think they work together very well.
Code
#nullable enable
namespaceA{publicclassC{publicvoidM(){C?c=null;c ??= new C();
c.M();}}}
Expected behavior
The following code emits the same IL as the code above and has no warnings:
Context
Currently, both null coalescing assignment and nullable reference types are available together in Visual Studio 19 Preview 1. However, I don't think they work together very well.
Code
Expected behavior
The following code emits the same IL as the code above and has no warnings:
For consistency reasons, the expected behavior for the stated code should also be zero warnings.
Atual behavior
The text was updated successfully, but these errors were encountered: