mirror of
https://github.com/zeek/zeek.git
synced 2025-10-02 14:48:21 +00:00
type-checking fix for vector-of-string operations
This commit is contained in:
parent
3cf3cc3c5e
commit
1d7e71b499
1 changed files with 4 additions and 2 deletions
|
@ -1992,8 +1992,10 @@ EqExpr::EqExpr(ExprTag arg_tag, ExprPtr arg_op1, ExprPtr arg_op2)
|
|||
}
|
||||
}
|
||||
|
||||
else if ( bt1 == TYPE_PATTERN && bt2 == TYPE_STRING )
|
||||
;
|
||||
else if ( (bt1 == TYPE_PATTERN && bt2 == TYPE_STRING) || (bt1 == TYPE_STRING && bt2 == TYPE_PATTERN) ) {
|
||||
if ( op1->GetType()->Tag() == TYPE_VECTOR )
|
||||
ExprError("cannot compare string vectors with pattern vectors");
|
||||
}
|
||||
|
||||
else
|
||||
ExprError("type clash in comparison");
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue