Is it possible to define an extension and use an enum value as the 
extension id?

Say with the following files defined:

*file: MessageType.proto:*

enum MessageType {
    MSG_TYPE_1 = 100;
    MSG_TYPE_2 = 101;
}


*file: AMessage.proto:*

import "MessageType.proto";

message AMessage {
    required MessageType  type = 1;
    extensions 100 to 200;
}


*file: MessageType1.proto:*

import "MessageType.proto";
import "AMessage.proto";

message MessageType1 {
  extend AMessage {
    required MessageType1  ext_type = 100;  // here I would like to use 
MessageType.MSG_TYPE_1
  }
}

Is it possible to use an enum definition in the extension definition?  I 
keep getting an error from protoc saying it is expecting a field number.

Thanks, 
Chris

-- 
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 protobuf+unsubscr...@googlegroups.com.
To post to this group, send email to protobuf@googlegroups.com.
Visit this group at http://groups.google.com/group/protobuf?hl=en.
For more options, visit https://groups.google.com/groups/opt_out.


Reply via email to