mirror of
https://github.com/zeek/zeek.git
synced 2025-10-05 08:08:19 +00:00
Fix the "-=" operator for intervals
Fixed a bug where "a -= b" (both operands are intervals) was not allowed in bro scripts (although "a = a - b" is allowed).
This commit is contained in:
parent
9357aeb6b1
commit
cd21eb5b6a
1 changed files with 2 additions and 0 deletions
|
@ -1516,6 +1516,8 @@ RemoveFromExpr::RemoveFromExpr(Expr* arg_op1, Expr* arg_op2)
|
|||
|
||||
if ( BothArithmetic(bt1, bt2) )
|
||||
PromoteType(max_type(bt1, bt2), is_vector(op1) || is_vector(op2));
|
||||
else if ( BothInterval(bt1, bt2) )
|
||||
SetType(base_type(bt1));
|
||||
else
|
||||
ExprError("requires two arithmetic operands");
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue