Closed felixangell closed 6 years ago
another case of this is
func main() {
let a = 15;
if a < 14 {
a = 6;
}
if a <= 15 {
a = 8;
}
if a < 50 {
a = 9;
}
return a;
}
/// .stdout
/// 9
This gives us 8 and not 9. The same happens when checking a <= 50
func main() {
let j = 0;
while j != 0 {
j = j - 1;
}
return j;
}
/// .stdout
/// 0
Gives -1 and not 0
Fixed!
b > 1
evaluates to true even thoughb
is equal to1
and not greater than