leo/tests/compiler/integers/i32/ternary.leo

14 lines
203 B
Plaintext
Raw Normal View History

2021-05-10 20:19:19 +03:00
/*
namespace: Compile
expectation: Pass
input_file:
- inputs/tern.in
- inputs/tern_rev.in
2021-05-10 20:19:19 +03:00
*/
function main(s: bool, a: i32, b: i32, c: i32) -> bool {
let r: i32 = s ? a : b;
2021-05-10 20:19:19 +03:00
return r == c;
}