OCaml generated code does not compile
-------------------------------------
Key: THRIFT-1096
URL: https://issues.apache.org/jira/browse/THRIFT-1096
Project: Thrift
Issue Type: Bug
Components: OCaml - Compiler
Affects Versions: 0.5
Environment: The Objective Caml toplevel, version 3.13.0+dev2
(2010-10-22)
Reporter: Joel Reymont
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
--
This message is automatically generated by JIRA.
For more information on JIRA, see: http://www.atlassian.com/software/jira