mirror of
https://github.com/ProvableHQ/leo.git
synced 2024-11-24 07:48:04 +03:00
21 lines
228 B
Plaintext
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);
|
|
} |