leo/asg/tests/fail/mutability/circuit_static_function_mut.leo

9 lines
161 B
Plaintext
Raw Normal View History

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