+ if(t == &node_plus) {
+ if((TYPE_IS_XMLLIST(type1) || TYPE_IS_XML(type1)) &&
+ (TYPE_IS_XMLLIST(type2) || TYPE_IS_XML(type2)))
+ return TYPE_OBJECT;
+ if(BOTH_INT(type1, type2))
+ return TYPE_INT;
+ if(IS_NUMBER_OR_INT(type1) && IS_NUMBER_OR_INT(type2))
+ return TYPE_NUMBER;
+ if(TYPE_IS_DATE(type1) || TYPE_IS_DATE(type2))
+ return TYPE_OBJECT;
+ if(TYPE_IS_STRING(type1) || TYPE_IS_STRING(type2)) {
+ /* depending on where the strings come from, the result type
+ of an "add" might be an object or a string, depending on the
+ verifier's mood. So basically we just don't know the type. */
+ return TYPE_VOID;
+ }
+ if(TYPE_IS_ANY(type1) || TYPE_IS_ANY(type2))
+ return TYPE_ANY;
+ return TYPE_OBJECT; // e.g. array+array = object
+ }
+