Support appending to vector of any

For consistency, since it already works to assign to an index within
vector of any.
This commit is contained in:
Jon Siwek 2018-11-07 11:46:34 -06:00
parent 808f1d1524
commit ca014d6e35
5 changed files with 31 additions and 3 deletions

View file

@ -1485,8 +1485,9 @@ AddToExpr::AddToExpr(Expr* arg_op1, Expr* arg_op2)
ExprError("appending non-arithmetic to arithmetic vector");
}
else if ( bt1 != bt2 )
ExprError("incompatible vector append");
else if ( bt1 != bt2 && bt1 != TYPE_ANY )
ExprError(fmt("incompatible vector append: %s and %s",
type_name(bt1), type_name(bt2)));
else
SetType(op1->Type()->Ref());