reflect/prototype: initial commit
Add the prototype package which provides constructors for
protoreflect.{Enum,Message,Extension}Type.
Switch all usages of the internal/prototype equivalent to the new package.
Switch all custom implementions of {Enum,Message}Type to the new package.
Change-Id: Ia9dae6fed4f2b90e55c123627044a7faf098c4b1
Reviewed-on: https://go-review.googlesource.com/c/protobuf/+/178438
Reviewed-by: Damien Neil <dneil@google.com>
diff --git a/internal/value/map.go b/internal/value/map.go
index 3461d2e..9fc7358 100644
--- a/internal/value/map.go
+++ b/internal/value/map.go
@@ -77,7 +77,7 @@
}
}
func (ms mapReflect) NewMessage() pref.Message {
- return ms.valConv.MessageType.New()
+ return ms.valConv.NewMessage()
}
func (ms mapReflect) ProtoUnwrap() interface{} {
return ms.v.Interface()