mirror of
https://github.com/zeek/zeek.git
synced 2025-10-11 11:08:20 +00:00
remove redundant record coercions
This commit is contained in:
parent
aaefdcca55
commit
f866252e5e
2 changed files with 7 additions and 3 deletions
|
@ -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));
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue