leo/asg/tests/fail/mutability/circuit_static_function_mut.leo
2021-01-25 07:19:38 -08:00

9 lines
165 B
Plaintext

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