leo/compiler/tests/mutability/function_input_mut.leo

6 lines
133 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-07-31 02:37:01 +03:00
assert_eq!(a, true);
}