mirror of
https://github.com/protocolbuffers/protobuf-go.git
synced 2025-02-03 17:54:00 +00:00
4532dd7969
The protobuf type system hacks the representation of map entries into that of a pseudo-message descriptor. Previously, we made all message descriptors implement MessageType where type descriptors had a GoType method that simply returned nil. Unfortunately, this violates a nice property in the Go type system where being able to assert to a MessageType guarantees that Go type information is truly associated with that descriptor. This CL makes it such that message descriptors for map entries do not implement MessageType. Change-Id: I23873cb71fe0ab3c0befd8052830ea6e53c97ca9 Reviewed-on: https://go-review.googlesource.com/c/protobuf/+/168399 Reviewed-by: Damien Neil <dneil@google.com>