noname
noname copied to clipboard
Hint ite statements
@katat I think I could not explain things in the issue so I have raised a draft pull request. For the example of if_else.no taken in the pr it works as the blocks early returns but if I change the example to something like this:
hint fn ite(xx: Field , arr: [Field;LEN]) -> Field {
let mut var = 0;
if xx == 10 {
var = xx;
for idx in 0..LEN {
var = var + arr[idx];
}
var = xx * var;
} else {
var = xx * xx;
}
return var;
}
this causes the then_branch return type to panic. So how can I support these type of statements? moreover what about only if statements?
@katat hey sorry for the delay I am a little busy with some work this week. I will pick this up again after the weekend