mirror of
https://github.com/protocolbuffers/protobuf-go.git
synced 2025-01-01 11:58:21 +00:00
9f1165c3bf
The protoreflect documentation states that Get on an empty repeated or map field returns an invalid (empty, read-only) List or Map. We weren't doing this; fix it. The documentation also states that an invalid List or Map may not be assigned via Set. We were permitting Set with an invalid map; fix this. Add tests for this behavior in prototest. Change-Id: I4678af532e192210af0bde7c96a1439a4cd26efa Reviewed-on: https://go-review.googlesource.com/c/protobuf/+/209019 Reviewed-by: Joe Tsai <joetsai@google.com> |
||
---|---|---|
.. | ||
prototest_test.go | ||
prototest.go |