mirror of
https://github.com/zeek/zeek.git
synced 2025-10-11 02:58:20 +00:00
Support appending to vector of any
For consistency, since it already works to assign to an index within vector of any.
This commit is contained in:
parent
808f1d1524
commit
ca014d6e35
5 changed files with 31 additions and 3 deletions
|
@ -1485,8 +1485,9 @@ AddToExpr::AddToExpr(Expr* arg_op1, Expr* arg_op2)
|
|||
ExprError("appending non-arithmetic to arithmetic vector");
|
||||
}
|
||||
|
||||
else if ( bt1 != bt2 )
|
||||
ExprError("incompatible vector append");
|
||||
else if ( bt1 != bt2 && bt1 != TYPE_ANY )
|
||||
ExprError(fmt("incompatible vector append: %s and %s",
|
||||
type_name(bt1), type_name(bt2)));
|
||||
|
||||
else
|
||||
SetType(op1->Type()->Ref());
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue