leo/compiler/tests/statements/conditional/for_loop.leo
2020-08-16 17:20:47 -07:00

14 lines
182 B
Plaintext

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