mirror of
https://github.com/AleoHQ/leo.git
synced 2024-12-19 23:52:02 +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);
|
|
} |