leo/compiler/tests/mutability/function_input_mut.leo

6 lines
139 B
Plaintext
Raw Normal View History

// Adding the `mut` keyword makes a function variable mutable.
2020-07-31 02:37:01 +03:00
function main(mut a: bool) {
a = true;
2020-08-17 05:14:26 +03:00
console.assert(a == true);
}