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
It would be nice to infer the use of && based on the receiver (or arguments) type and compile as expected or at least alert the developers that there is some undefined behaviour (then they can clarify with some unambiguous operation).
The text was updated successfully, but these errors were encountered:
Related are: #523 and #446 by @hernanmd. I think you should take a look at the discussions there.
Before this used to do the wrong translation using the wrong type (the developer has to guess which is which). And we forbid it at compile time to avoid this kind of issues.
C lang defines two ways to perform an AND operation: one for booleans and the other for integers (keep the sign).
To represent this difference, there are two methods in Slang
&&
andbitAnd:
.Sometimes, we fail to choose the correct method, overpassing the checks in Slang and the C compiler.
For example, Alamvic/druid@de7af6f#diff-df143dcb625fab9632c19e459636eca5ed081f3f308b742420b793b23c86ef95L78.
It would be nice to infer the use of
&&
based on the receiver (or arguments) type and compile as expected or at least alert the developers that there is someundefined behaviour
(then they can clarify with some unambiguous operation).The text was updated successfully, but these errors were encountered: