leo/tests/pass/parse/statements/for_loop.leo
2021-03-08 14:45:38 -08:00

14 lines
179 B
Plaintext

function main(a: bool) {
let mut b = 0u32;
if a {
for i in 0..4 {
b += i;
}
}
let r: u32 = a ? 6 : 0;
console.assert(r == b);
}