jhump / protoreflect

Reflection (Rich Descriptors) for Go Protocol Buffers
Apache License 2.0
1.35k stars 172 forks source link

Fix support of SetNumber for enum builder #569

Closed ilaleksin closed 1 year ago

ilaleksin commented 1 year ago

This addresses https://github.com/jhump/protoreflect/issues/570 Enum Builder panics if some of EnumValue's have Number field explicitly set.

Particularly, it copies logic from message builder https://github.com/jhump/protoreflect/blob/master/desc/builder/message.go#L756