leo/tests/compiler/function/iteration.leo

20 lines
266 B
Plaintext
Raw Normal View History

2021-05-05 18:29:44 +03:00
/*
namespace: Compile
expectation: Pass
input_file: input/dummy.in
*/
2020-06-23 04:28:30 +03:00
function one() -> u32 {
return 1u32;
2020-06-23 04:28:30 +03:00
}
function main(y: bool) -> bool {
let a: u32 = 0u32;
2020-06-23 04:28:30 +03:00
for i: u32 in 0u32..10u32 {
2022-04-27 22:04:45 +03:00
a = a + one();
2020-07-17 22:59:18 +03:00
}
2020-06-23 04:28:30 +03:00
2021-07-01 23:40:29 +03:00
return (a == 10u32) == y;
2021-05-05 18:29:44 +03:00
}