leo/tests/compiler/mutability/circuit_function_mut.leo
2021-04-19 18:08:14 -07:00

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;
}