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
At the LDM on 2019-02-13, we agreed on our intent to track assignments through ref expressions (though we will not track aliasing through ref variables). The following would be a good test. We currently report the third and fourth expected warnings, but we fail to report the first and second.
#nullable enable
staticvoidM(boolb,stringnonNull,string?maybeNull){string?x=nonNull;string?y=nonNull;(b?refx:refy)= maybeNull;x.ToString();// should be warning: possible dereference of a null referencey.ToString();// should be warning: possible dereference of a null referencex=maybeNull;y=maybeNull;(b?refx:refy)= nonNull;x.ToString();// should be warning: possible dereference of a null referencey.ToString();// should be warning: possible dereference of a null reference}
The text was updated successfully, but these errors were encountered:
At the LDM on 2019-02-13, we agreed on our intent to track assignments through ref expressions (though we will not track aliasing through ref variables). The following would be a good test. We currently report the third and fourth expected warnings, but we fail to report the first and second.
The text was updated successfully, but these errors were encountered: