mirror of
https://github.com/protocolbuffers/protobuf-go.git
synced 2025-02-10 12:39:48 +00:00
internal/value: fix GoValueOf for v2 message types
Was using a pref.Message where we want a pref.ProtoMessage. Change-Id: I61d986a43eaf8f945a1378a7a10120474aa89d6f Reviewed-on: https://go-review.googlesource.com/c/153697 Reviewed-by: Joe Tsai <thebrokentoaster@gmail.com>
This commit is contained in:
parent
232ea15589
commit
887028d7ae
@ -171,7 +171,7 @@ func NewLegacyConverter(t reflect.Type, k pref.Kind, w LegacyWrapper) Converter
|
||||
return pref.ValueOf(v.Interface())
|
||||
},
|
||||
GoValueOf: func(v pref.Value) reflect.Value {
|
||||
rv := reflect.ValueOf(v.Message())
|
||||
rv := reflect.ValueOf(v.Message().Interface())
|
||||
if rv.Type() != t {
|
||||
panic(fmt.Sprintf("invalid type: got %v, want %v", rv.Type(), t))
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user