leo/asg/tests/pass/statements/conditional/for_loop.leo

14 lines
179 B
Plaintext
Raw Normal View History

2021-01-25 18:17:42 +03:00
function main(a: bool) {
let mut b = 0u32;
if a {
for i in 0..4 {
b += i;
}
}
2021-03-09 01:45:38 +03:00
let r: u32 = a ? 6 : 0;
2021-01-25 18:17:42 +03:00
console.assert(r == b);
}