code: @Override
      protected Type getReturnType(final int mOp1, final int mOp2) throws TTXPathException {
  
          Type type1;
          Type type2;
          try {
              type1 = Type.getType(mOp1).getPrimitiveBaseType();
              type2 = Type.getType(mOp2).getPrimitiveBaseType();
          } catch (final IllegalStateException e) {
              throw new XPathError(ErrorType.XPTY0004);
          }
  
          if (type1.isNumericType() && type2.isNumericType()) {
  
              return Type.INTEGER;
          } else {
  
              throw new XPathError(ErrorType.XPTY0004);
  
          }
      }
docs: {@inheritDoc}