leo/tests/pass/parse/circuits/member_variable_and_function.leo

16 lines
199 B
Plaintext
Raw Normal View History

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