leo/tests/compiler/circuits/member_function.leo
2021-04-19 18:08:14 -07:00

13 lines
181 B
Plaintext

circuit Foo {
x: u32,
function echo(self) -> u32 {
return self.x;
}
}
function main() {
const a = Foo { x: 1u32 };
console.assert(a.echo() == 1u32);
}