leo/tests/pass/parse/statements/for_loop.leo

14 lines
179 B
Plaintext
Raw Normal View History

2021-03-03 20:59:24 +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-03-03 20:59:24 +03:00
console.assert(r == b);
}