code: FunctionTypeBuilder inferThisType(JSDocInfo info, JSType type) {
      // Look at the @this annotation first.
      inferThisType(info);
  
      if (thisType == null) {
        ObjectType objType = ObjectType.cast(type);
        if (objType != null && (info == null || !info.hasType())) {
          thisType = objType;
        }
      }
  
      return this;
    }
docs: Infers the type of {@code this}.
  @param type The type of this if the info is missing.