Currently, the following fe code:
fn helper(x: u64) -> u64 { x + 1 }
pub fn test_if_else(x: u64) -> u64 {
if x > 10 {
let x : u64 = helper(x: 67)
x
} else {
10
}
}
Compiles to this:
function helper(x) -> ret {
ret := add(x, 1)
}
function test_if_else(x) -> ret {
let v0 := 0
if gt(x, 10) {
v0 := x
}
if iszero(gt(x, 10)) {
v0 := 10
}
ret := v0
}
Notice the helper function is never called.