leo/tests/pass/parse/circuits/member_function.leo
2021-03-03 09:59:24 -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);
}