leo/asg/tests/pass/circuits/member_variable_and_function.leo

16 lines
203 B
Plaintext
Raw Normal View History

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