implement variable access to ifelse array
This commit is contained in:
parent
b74e0b6dc6
commit
87fccb3457
1 changed files with 15 additions and 1 deletions
|
@ -945,7 +945,21 @@ impl Flattener {
|
|||
"please use intermediate variables for now"
|
||||
)
|
||||
}
|
||||
FieldElementArrayExpression::IfElse(..) => unimplemented!(),
|
||||
FieldElementArrayExpression::IfElse(
|
||||
condition,
|
||||
consequence,
|
||||
alternative,
|
||||
) => FieldElementExpression::IfElse(
|
||||
condition,
|
||||
box FieldElementExpression::Select(
|
||||
consequence,
|
||||
box FieldElementExpression::Number(T::from(i)),
|
||||
),
|
||||
box FieldElementExpression::Select(
|
||||
alternative,
|
||||
box FieldElementExpression::Number(T::from(i)),
|
||||
),
|
||||
),
|
||||
},
|
||||
box FieldElementExpression::Number(T::from(0)),
|
||||
)
|
||||
|
|
Loading…
Reference in a new issue