leo/tests/compiler/function/standard_function_calls_transition_function_fail.leo
2022-10-05 16:53:49 -07:00

23 lines
420 B
Plaintext

/*
namespace: Compile
expectation: Fail
input_file: inputs/dummy.in
*/
program test.aleo {
function main(a: u32, b: u32, y: bool) -> u32 {
if y {
return adder(a, b);
} else {
return subber(a, b);
}
}
transition adder(a: u32, b: u32) -> u32 {
return a + b;
}
transition subber(a: u32, b: u32) -> u32 {
return a - b;
}}