internal/impl: add ProtoMessageV1Of and ProtoMessageV2Of
These functions are used by v1 code to switch between
protoV1.Message and protoV2.Message.
Wrappers over them may be exposed in a hypothetical protoadapt package.
Change-Id: Ib5265420e34e9888b540307962c70189625d663c
Reviewed-on: https://go-review.googlesource.com/c/protobuf/+/193180
Reviewed-by: Damien Neil <dneil@google.com>
diff --git a/internal/impl/legacy_test.go b/internal/impl/legacy_test.go
index 3ff3f3c..a231fec 100644
--- a/internal/impl/legacy_test.go
+++ b/internal/impl/legacy_test.go
@@ -554,9 +554,17 @@
Enum int32
)
+func (*MessageA) Reset() { panic("not implemented") }
+func (*MessageA) String() string { panic("not implemented") }
+func (*MessageA) ProtoMessage() { panic("not implemented") }
func (*MessageA) Descriptor() ([]byte, []int) { return concurrentFD, []int{0} }
+
+func (*MessageB) Reset() { panic("not implemented") }
+func (*MessageB) String() string { panic("not implemented") }
+func (*MessageB) ProtoMessage() { panic("not implemented") }
func (*MessageB) Descriptor() ([]byte, []int) { return concurrentFD, []int{1} }
-func (Enum) EnumDescriptor() ([]byte, []int) { return concurrentFD, []int{0} }
+
+func (Enum) EnumDescriptor() ([]byte, []int) { return concurrentFD, []int{0} }
var concurrentFD = func() []byte {
b, _ := proto.Marshal(pdesc.ToFileDescriptorProto(mustMakeFileDesc(`