leo/compiler/tests/mutability/circuit_static_function_mut.leo

9 lines
161 B
Plaintext

// Adding the `mut` keyword makes a circuit variable mutable.
circuit Foo {
function bar() {}
}
function main() {
let a = Foo { x: 1 };
a.bar = 0;
}