Skip to content

Commit

Permalink
Throw an error for repeated in makeWrapper.
Browse files Browse the repository at this point in the history
  • Loading branch information
robshakir committed Nov 7, 2023
1 parent 7a7b21d commit 0d75462
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion protomap/proto.go
Original file line number Diff line number Diff line change
Expand Up @@ -942,7 +942,7 @@ func makeWrapper(msg protoreflect.Message, fd protoreflect.FieldDescriptor, val
// If this field was a repeated then it could be a typed value -- but this is handled
// separately, thus we simply return false here.
if fd.IsList() {
return nil, false, nil
return nil, false, fmt.Errorf("%s: unexpectedly got a protobuf repeated field in makeWrapper, logic error", fd.FullName())
}

var wasTypedVal bool
Expand Down

0 comments on commit 0d75462

Please sign in to comment.