mirror of
https://github.com/zeek/zeek.git
synced 2025-10-08 09:38:19 +00:00
GH-1273: Change SizeExpr to yield "any" type when operating on "any"
This commit is contained in:
parent
721b232d94
commit
d4528162d1
4 changed files with 31 additions and 1 deletions
|
@ -1162,7 +1162,9 @@ SizeExpr::SizeExpr(ExprPtr arg_op)
|
|||
if ( IsError() )
|
||||
return;
|
||||
|
||||
if ( op->GetType()->InternalType() == TYPE_INTERNAL_DOUBLE )
|
||||
if ( op->GetType()->Tag() == TYPE_ANY )
|
||||
SetType(base_type(TYPE_ANY));
|
||||
else if ( op->GetType()->InternalType() == TYPE_INTERNAL_DOUBLE )
|
||||
SetType(base_type(TYPE_DOUBLE));
|
||||
else
|
||||
SetType(base_type(TYPE_COUNT));
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue