-
Notifications
You must be signed in to change notification settings - Fork 8
Open
Description
It appears extprot accepts message alias to message, but generates bad code. This possibility is not documented afaik, not sure if it should be fixed or forbidden, I stumbled on this accidentaly.
Consider :
$ cat a.proto
message m1 = { a : int }
message m2 = M1.m1
$ ./compiler/extprotc a.proto -o /dev/stdout |grep M1
module M1 =
[ ("M1.a", (Extprot.Pretty_print.pp_field (fun t -> t.a) Extprot.Pretty_print.pp_int)) ] pp;;
type _m2 = M1.M1.m1;;
type m2 = M1.M1.m1;;
let m2_default = ref (fun () -> !M1.M1.m1_default ());;
let pp_m2 pp = M1.M1.pp_m1 pp;;
let read_m2 s = M1.M1.read_m1 s;;
let io_read_m2 s = M1.M1.io_read_m1 s;;
let write_m2 b msg = M1.M1.write_m1 b msg;;
Metadata
Metadata
Assignees
Labels
No labels