leo/tests/compiler/circuits/define_circuit_inside_circuit_function.leo
2021-05-06 14:27:42 +03:00

28 lines
353 B
Plaintext

/*
namespace: Compile
expectation: Pass
inputs:
- func_circ.in: |
[main]
a: u32 = 100;
[registers]
r0: bool = false;
*/
circuit Foo {
a: u32,
}
circuit Bar {
function bar(a: u32) -> u32 {
let f = Foo { a: a };
return f.a;
}
}
function main(a: u32) -> bool {
let b = Bar::bar(a);
return a == b;
}