Closed spinda closed 4 years ago
& applied to two booleans is the non-short-circuiting logical AND. That works here, but && is probably what was intended.
&
&&
i guess it would be better if we can write test so there wouldn't be such bug?
Not possible as the behavior of the code is the same either way (& just doesn't apply short-circuiting).
&
applied to two booleans is the non-short-circuiting logical AND. That works here, but&&
is probably what was intended.