On Wed, May 25, 2016 at 5:44 PM, Marcos Juarez <[email protected]> wrote:

> I ran into a situation today in which I needed to use the "reserved"
> keyword in a protobuf definition, so that in the future, nobody would use
> those fields.  I've attached a screenshot of what the docs say, from
> https://developers.google.com/protocol-buffers/docs/proto#reserved
>
> [image: Inline image 1]
>
> However, when I try to use that keyword in an actual message with field
> definitions, protoc always complains with the following error:
>
> *Expected "required", "optional", or "repeated".*
>
> My protobuf definition looks like this:
>
> message MyMessage {
>       // Some comments
>       reserved, 4, 108, 109;
>

Did you mean "reserved 4, 108, 109;"?

  -ilia

-- 
You received this message because you are subscribed to the Google Groups 
"Protocol Buffers" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To post to this group, send email to [email protected].
Visit this group at https://groups.google.com/group/protobuf.
For more options, visit https://groups.google.com/d/optout.

Reply via email to