leo/tests/compiler/statements/chain.leo

22 lines
308 B
Plaintext
Raw Normal View History

2021-04-20 04:08:14 +03:00
/*
namespace: Compile
expectation: Pass
input_file:
2021-05-03 17:28:53 +03:00
- inputs/u32_3.in
- inputs/u32_5.in
- inputs/u32_6.in
2021-04-20 04:08:14 +03:00
*/
function main(x: u32) -> bool {
let c: u32 = 0u32;
2021-04-20 04:08:14 +03:00
if x == 1u32 {
c = 1u32;
} else if x == 2u32 {
c = 2u32;
2021-04-20 04:08:14 +03:00
} else {
c = 3u32;
2021-04-20 04:08:14 +03:00
}
return c == x;
}