leo/tests/pass/parse/circuits/member_function.leo

13 lines
178 B
Plaintext
Raw Normal View History

2021-03-03 20:59:24 +03:00
circuit Foo {
x: u32,
function echo(self) -> u32 {
return self.x
}
}
function main() {
let a = Foo { x: 1u32 };
console.assert(a.echo() == 1u32);
}