GH-1273: Change SizeExpr to yield "any" type when operating on "any"

This commit is contained in:
Jon Siwek 2020-11-09 19:03:42 -08:00
parent 721b232d94
commit d4528162d1
4 changed files with 31 additions and 1 deletions

View file

@ -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));