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

5 lines
99 B
Plaintext
Raw Normal View History

2020-07-31 02:20:31 +03:00
function main(s: bool, a: i32, b: i32, c: i32) {
let r = if s ? a : b;
assert_eq!(r, c);
2020-07-16 07:55:45 +03:00
}