[#108] protogen: Distinguish between empty and nil messages

Refs #59

Signed-off-by: Evgenii Stratonikov <e.stratonikov@yadro.com>
This commit is contained in:
Evgenii Stratonikov 2024-08-27 10:53:43 +03:00
parent 11e194d274
commit 5fece80b42
18 changed files with 282 additions and 283 deletions

View file

@ -288,7 +288,7 @@ func (x *Primitives) EmitProtobuf(mm *easyproto.MessageMarshaler) {
}
}
if inner, ok := x.FieldM.(*Primitives_FieldAux); ok {
if inner.FieldAux != nil && inner.FieldAux.StableSize() != 0 {
if inner.FieldAux != nil {
inner.FieldAux.EmitProtobuf(mm.AppendMessage(403))
}
}