leo/tests/parser/functions/bounded_recursion.leo

16 lines
186 B
Plaintext
Raw Normal View History

2022-01-28 21:34:02 +03:00
/*
namespace: Parse
2022-05-17 15:41:30 +03:00
expectation: Fail
2022-01-28 21:34:02 +03:00
*/
function x(constant y: u32) -> u8 {
2022-01-28 21:34:02 +03:00
if y < 5u32 {
2022-03-08 21:20:05 +03:00
x(y+1u32);
2022-01-28 21:34:02 +03:00
}
}
function main(y: bool) -> bool {
x(1u32);
return y;
2022-05-17 15:41:30 +03:00
}