oneof keyword name cannot be "message"
Closed this issue · 1 comments
cyocum commented
When running under 1.2.0, if the following .proto file is passed to ocaml-protoc
:
syntax = "proto3";
package foo;
message Wrapper {
oneof message {
Source source = 1;
}
}
message Source {
string uri = 1;
string data = 2;
}
It will cause a parse error: messages/messages.proto:5:0: Parsing error.
If the oneof
name is changed to something else it will create the ml/mli files as expected. Thus, the below will work:
syntax = "proto3";
package foo;
message Wrapper {
oneof foo {
Source source = 1;
}
}
message Source {
string uri = 1;
string data = 2;
}