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
using Microsoft;
#nullable enable
classProgram{staticobject?v;staticvoidMain(string[]args){
Verify.Operation(v!=null, v.ToString());
v.ToString();}}
Expected Behavior:
CS8602 identifies that v.ToString() is a dereference of a possibly null value.
Actual Behavior:
No warning is emitted of the null reference.
It seems that the Verify.Operation call, which is annotated to not return if the condition passed as the first argument is false is inappropriately applied as validated even for the subsequent arguments passed to that method.
The text was updated successfully, but these errors were encountered:
What is the signature of Verify.Operation? Does it have any attributes?
Even better would be to provide a standalone repro (sharplab link for instance). Thanks
Version Used: VS 16.5 Preview 1 (29502.12.master)
Steps to Reproduce:
Install-Package Microsoft.VisualStudio.Validation -Version 15.5.31
Expected Behavior:
CS8602 identifies that
v.ToString()
is a dereference of a possibly null value.Actual Behavior:
No warning is emitted of the null reference.
It seems that the
Verify.Operation
call, which is annotated to not return if the condition passed as the first argument isfalse
is inappropriately applied as validated even for the subsequent arguments passed to that method.The text was updated successfully, but these errors were encountered: