Merge remote-tracking branch 'origin/topic/jsiwek/gh-1273-size-expr-any'

* origin/topic/jsiwek/gh-1273-size-expr-any:
  GH-1273: Change SizeExpr to yield "any" type when operating on "any"
This commit is contained in:
Jon Siwek 2020-11-12 14:30:52 -08:00
commit 4618df762d
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));