leo/compiler/tests/mutability/function_input_mut.leo

6 lines
124 B
Plaintext
Raw Normal View History

// Adding the `mut` keyword makes a function variable mutable.
function main(mut a: u32) -> u32 {
2020-07-17 22:59:18 +03:00
a = 0;
2020-07-17 22:59:18 +03:00
return a
}