leo/tests/compiler/mutability/circuit_function_mut.leo
2021-05-05 18:29:44 +03:00

23 lines
255 B
Plaintext

/*
namespace: Compile
expectation: Pass
input_file: input/dummy.in
*/
circuit Foo {
x: u32
function foo(mut self) {
self.x = 10;
}
}
function main() -> bool {
let a = Foo { x: 1 };
a.foo();
return a.x == 10u32;
}