ocaml-ppx / ppx_deriving_protobuf

A Protocol Buffers codec generator for OCaml
MIT License
82 stars 13 forks source link

Why int list as unnamed type is not allowed in variant types? #15

Open mryau opened 7 years ago

mryau commented 7 years ago

Hello, I don't understand why following declarations will be compiled: type is = int list [@@deriving protobuf { protoc }] type io = | Port of int [@key 1] | Agg of is [@key 2] [@@deriving protobuf { protoc }] but this declaration: type io = | Port of int [@key 1] | Agg of int list [@key 2] [@@deriving protobuf { protoc }] will cause the following error: File "src/ppx_deriving_protobuf.cppo.ml", line 1113, characters 28-34: Assertion failed

whitequark commented 7 years ago

An assertion failure is a bug.

glyh commented 4 days ago

Could anyone provide any hint on how should I fix it?