leo/asg/tests/pass/circuits/self_member.leo

14 lines
196 B
Plaintext
Raw Normal View History

2021-01-25 18:17:42 +03:00
circuit Foo {
f: u32,
function bar(self) -> u32 {
return self.f;
2021-01-25 18:17:42 +03:00
}
}
function main() {
const a = Foo { f: 1u32 };
const b = a.bar();
2021-01-25 18:17:42 +03:00
console.assert(b == 1u32);
}