remove redundant record coercions

This commit is contained in:
Vern Paxson 2023-04-10 11:42:48 -07:00
parent aaefdcca55
commit f866252e5e
2 changed files with 7 additions and 3 deletions

View file

@ -4215,6 +4215,10 @@ TableCoerceExpr::TableCoerceExpr(ExprPtr arg_op, TableTypePtr tt, bool type_chec
SetError();
return;
}
if ( op->Tag() == EXPR_TABLE_COERCE && op->GetType() == tt )
// Avoid double-coercion.
op = op->GetOp1();
}
SetType(std::move(tt));