leo/tests/compiler/mutability/circuit_function_mut.leo
2021-05-03 17:28:53 +03:00

21 lines
228 B
Plaintext

/*
namespace: Compile
expectation: Pass
*/
circuit Foo {
x: u32
function foo(mut self) {
self.x = 10;
}
}
function main() {
let a = Foo { x: 1 };
a.foo();
console.assert(a.x == 10u32);
}