leo/tests/parser/statement/for_loop.leo

20 lines
286 B
Plaintext
Raw Normal View History

2021-04-20 04:08:14 +03:00
/*
namespace: Compile
expectation: Pass
2021-05-03 17:28:53 +03:00
input_file: inputs/u32_3.in
2021-04-20 04:08:14 +03:00
*/
function main(x: u32) -> bool {
let b: u32 = 0u32;
2021-04-20 04:08:14 +03:00
if x == 3u32 {
for i: u32 in 0u32..4u32 {
b = b + i;
2021-04-20 04:08:14 +03:00
}
}
let r: u32 = x == 3u32 ? 6u32 : 0u32;
2021-04-20 04:08:14 +03:00
return r == b;
}