leo/compiler/tests/statements/conditional/mutate.leo

12 lines
139 B
Plaintext
Raw Normal View History

function main(bit: u32) -> u32 {
2020-07-17 22:59:18 +03:00
let mut a = 5u32;
2020-07-17 22:59:18 +03:00
if bit == 1 {
a = 1;
} else {
a = 0;
}
2020-07-17 22:59:18 +03:00
return a
}