localshred/protobuf — pull request #69 by localshred (2013-03-09 00:03:52+00:00)
Title: extension fields end up in wrong class

When compiling the following the fields 'payload' will end up in PayloadA and B, whereas I'm under the impression that they should end up in Header.

package ExtensionBug;

message Header {
extensions 100 to max;
enum Type {
PayloadTypeA = 1;
PayloadTypeB = 2;
}
required Type type = 1;
}

message PayloadA {
extend Header {
optional PayloadA payload = 100;
}
}

message PayloadB {
extend Header {
optional PayloadB payload = 101;
}
}

There is a second issue in this example, for which I'll file a seperate ticket.