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
Branch master (26 Sep 2020)
Latest commit 3e38d76 by CyrusNajmabadi:
Merge pull request #48002 from CyrusNajmabadi/implicitCreation
Use implicit object creation in the IDE layers.
Steps to Reproduce:
Compile and run the following code:
#nullable enable
using System.Diagnostics.CodeAnalysis;classTest{publicstaticvoidMain(){string?s=null;
s.AllowNullExtension();
s.ToString();// no warnings, runtime crash}}publicstaticclassExtension{publicstaticvoidAllowNullExtension([AllowNull]thisstringp){}}
Expected Behavior:
Warning for s.ToString()
Actual Behavior:
No warnings. The program crashes at runtime with a NullReferenceException
The text was updated successfully, but these errors were encountered:
Version Used:
Steps to Reproduce:
Compile and run the following code:
Expected Behavior:
Warning for
s.ToString()
Actual Behavior:
No warnings. The program crashes at runtime with a
NullReferenceException
The text was updated successfully, but these errors were encountered: