leo/tests/compiler/function/iteration_repeated.leo

22 lines
279 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 iteration() -> u32 {
let a = 0u32;
2020-06-23 04:28:30 +03:00
2020-07-17 22:59:18 +03:00
for i in 0..10 {
a += 1;
}
2020-06-23 04:28:30 +03:00
return a;
2020-06-23 04:28:30 +03:00
}
2021-05-05 18:29:44 +03:00
function main() -> bool {
const total = iteration() + iteration();
2020-07-30 22:10:33 +03:00
2021-05-05 18:29:44 +03:00
return total == 20;
}