leo/tests/pass/parse/mutability/circuit_static_function_mut.leo

9 lines
165 B
Plaintext
Raw Normal View History

2021-03-03 20:59:24 +03:00
// Adding the `mut` keyword makes a circuit variable mutable.
circuit Foo {
function bar() {}
}
function main() {
let mut a = Foo { x: 1 };
a.bar = 0;
}