Uploaded image for project: 'Thrift'
  1. Thrift
  2. THRIFT-1096

OCaml generated code does not compile

    XMLWordPrintableJSON

    Details

    • Type: Bug
    • Status: Closed
    • Priority: Major
    • Resolution: Duplicate
    • Affects Version/s: 0.5
    • Fix Version/s: None
    • Component/s: OCaml - Compiler
    • Labels:
      None
    • Environment:

      The Objective Caml toplevel, version 3.13.0+dev2 (2010-10-22)

      Description

      What is generated:

      open Thrift
      class document :
      object
      method get_username : string option
      method grab_username : string
      method set_username : string -> unit
      method unset_username : unit
      method reset_username : unit
      method get_docname : string option
      method grab_docname : string
      method set_docname : string -> unit
      method unset_docname : unit
      method reset_docname : unit
      method get_page : int option
      method grab_page : int
      method set_page : int -> unit
      method unset_page : unit
      method reset_page : unit
      method copy
      method write : Protocol.t -> unit
      end
      val read_document : Protocol.t -> document

      What is needed (note the 'a in object and copy method).

      open Thrift
      class document :
      object ('a)
      method get_username : string option
      method grab_username : string
      method set_username : string -> unit
      method unset_username : unit
      method reset_username : unit
      method get_docname : string option
      method grab_docname : string
      method set_docname : string -> unit
      method unset_docname : unit
      method reset_docname : unit
      method get_page : int option
      method grab_page : int
      method set_page : int -> unit
      method unset_page : unit
      method reset_page : unit
      method copy : 'a
      method write : Protocol.t -> unit
      end
      val read_document : Protocol.t -> document

        Attachments

          Activity

            People

            • Assignee:
              Unassigned
              Reporter:
              wagerlabs Joel Reymont
            • Votes:
              0 Vote for this issue
              Watchers:
              0 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved: