leo/asg/tests/pass/statements/conditional/mutate.leo

16 lines
214 B
Plaintext
Raw Normal View History

2021-01-25 18:17:42 +03:00
function main(a: u32) {
let mut b = 5u32;
if a == 1 {
b = 1;
} else {
b = 0;
}
if a == 1 {
console.assert(b == 1);
} else {
console.assert(b == 0);
}
}