This was implemented for 2.1.0. Check the generated code docs for your language, under "fields", to see what the new constants look like.
On Tue, Dec 16, 2008 at 12:44 PM, Kenton Varda <ken...@google.com> wrote: > Hmm, I think a better idea would be for the protocol compiler to generate > an enum for each message type which contains all the field numbers. Then > you wouldn't have to define a separate enum in the .proto file. > > On Tue, Dec 16, 2008 at 12:53 AM, sorent < > soren.torstens...@tietoenator.com> wrote: > >> >> Hi, >> >> It seems that the proto compiler does not accept that enum values are >> used as field numbers ...right ? >> It would be nice to have a single declaration of field numbers that >> can also be used for message type >> field and in user code to switch on. Would that be possible to >> introduce ? >> >> BR /Sören >> >> >> > --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Protocol Buffers" group. To post to this group, send email to protobuf@googlegroups.com To unsubscribe from this group, send email to protobuf+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/protobuf?hl=en -~----------~----~----~----~------~----~------~--~---