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
Note that if flag is changed to the constant true, the warning is not given.
The suggestion here is that if either conditional expression arm has a split state, we join the StateWhenTrue on each arm, and join the StateWhenFalse on each arm, and use the resulting split state as the resulting state of the conditional expression.
The text was updated successfully, but these errors were encountered:
using System;publicclassC{publicvoidM(boolb1,boolb2){intx;if(b1?b2&& M(out x):b2&& M(out x)){
Console.WriteLine(x);// error CS0165: Use of unassigned local variable 'x'}}privatestaticboolM(outintx){x=1;returntrue;}}
SharpLab
Note that if
flag
is changed to the constanttrue
, the warning is not given.The suggestion here is that if either conditional expression arm has a split state, we join the StateWhenTrue on each arm, and join the StateWhenFalse on each arm, and use the resulting split state as the resulting state of the conditional expression.
The text was updated successfully, but these errors were encountered: