Skip to content

Commit

Permalink
Fix contexts for tuples in flatten_arraylit.
Browse files Browse the repository at this point in the history
  • Loading branch information
guidotack committed Nov 8, 2024
1 parent fd62677 commit 23a91c2
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion lib/flatten/flatten_arraylit.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,10 @@ EE flatten_arraylit(EnvI& env, const Ctx& ctx, Expression* e, VarDecl* r, VarDec
if (al->type().istuple() || al->type().isrecord()) {
// Struct types have to check if any element is boolean to ensure correct context
for (unsigned int i = al->size(); (i--) != 0U;) {
eval_ctx.b = c_root && Expression::type((*al)[i]).isbool() ? C_MIX : C_ROOT;
eval_ctx = ctx;
if (c_root && Expression::type((*al)[i]).isbool()) {
eval_ctx.b = C_MIX;
}
elems_ee[i] = flat_exp(env, eval_ctx, (*al)[i], rr, ctx.partialityVar(env));
}
} else {
Expand Down

0 comments on commit 23a91c2

Please sign in to comment.