leo/compiler/tests/circuits/member_function.leo
Protryon 80d5c87b8a asg
2021-02-02 11:08:56 -08:00

13 lines
178 B
Plaintext

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