mirror of
https://github.com/ProvableHQ/leo.git
synced 2024-11-27 02:24:15 +03:00
23 lines
420 B
Plaintext
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;
|
|
}}
|