Hello there,

I have a message definition with a oneof with 50 fields inside from which I 
generate C++ code:

message Req {
    oneof req{
        Foo foo = 1;
        Bar bar = 2;
        ...
        Baz baz = 50;
    }
}

Where Baz is:

message Baz {
    string path = 1;
}


The problem is that, on the receiving end, switch-casing the "req_case()" 
fails to match the Baz message. But if I assign it a field number <= 15 in 
the oneof, then it works.

Debug printing the message on the receiving end (for field numbers >15) 
shows nothing but for lower values I get:

baz {
  path: "foo"
}

>From the guide (
https://developers.google.com/protocol-buffers/docs/proto3#assigning_field_numbers)
 
I see one should be able to assign field numbers in the range 1 - 2^^29-1 
(excluding 19000-19999).

I'm I overlooking something?

Thanks in advance!

-- 
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 view this discussion on the web visit 
https://groups.google.com/d/msgid/protobuf/08e8b9d1-5171-4d33-9a97-9ac4228da332o%40googlegroups.com.

Reply via email to