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
assertions don’t work as far as I can tell
Even making the two explicit branches of the return explicit with an if (someBoolLocal) { someAssertion(); return true; } else { return false; } there are no good assertions that resolve this.
suppression with !
You could bang all the assignments to value. Seems smelly though
Should we relax the enforcement (since we don't track
bool
locals), or should we offer a way of suppressing?Relates to dotnet/runtime#36104 (comment)
Options so far:
assertions don’t work as far as I can tell
Even making the two explicit branches of the return explicit with an
if (someBoolLocal) { someAssertion(); return true; } else { return false; }
there are no good assertions that resolve this.suppression with
!
You could bang all the assignments to
value
. Seems smelly thoughexplicit suppression
#pragma warning disable CS8762
allow silencing the return statement
return someBoolLocal !;
.Only warn when we know the value of
someBoolLocal
.The text was updated successfully, but these errors were encountered: