mirror of
https://github.com/ProvableHQ/leo.git
synced 2024-12-25 19:22:01 +03:00
19 lines
282 B
Plaintext
19 lines
282 B
Plaintext
circuit Foo {
|
|
x: u32,
|
|
|
|
function add_x(y: u32) -> u32 {
|
|
return self.x + y
|
|
}
|
|
|
|
function call_add_x(y: u32) -> u32 {
|
|
return self.add_x(y)
|
|
}
|
|
}
|
|
|
|
function main() {
|
|
let a = Foo { x: 1u32 };
|
|
let b = a.call_add_x(1u32);
|
|
|
|
assert_eq!(b, 2u32);
|
|
}
|