leo/compiler/tests/mutability/circuit_static_function_mut.leo
2020-09-02 18:01:47 -07:00

9 lines
172 B
Plaintext

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