leo/tests/compiler/circuits/member_function.leo
2021-05-05 11:37:51 +03:00

23 lines
289 B
Plaintext

/*
namespace: Compile
expectation: Pass
inputs:
- member.in: |
[registers]
r0: bool = false;
*/
circuit Foo {
x: u32,
function echo(self) -> u32 {
return self.x;
}
}
function main() -> bool {
const a = Foo { x: 1u32 };
return a.echo() == 1u32;
}