Skip to content

Commit

Permalink
internal/impl: correct reflect.ValueError use
Browse files Browse the repository at this point in the history
The composites x/tools/analysis pass errors on this use of
reflect.ValueError with:

```
internal/impl/message_reflect_field.go:541:10: reflect.ValueError struct literal uses unkeyed fields (composites)
```

This patch adds the missing field names.

Change-Id: I1a175aad6e9724c27f2469adc1f3a9b1e8c61e85
Reviewed-on: https://go-review.googlesource.com/c/protobuf/+/553915
Reviewed-by: Christian Höppner <[email protected]>
Reviewed-by: Michael Stapelberg <[email protected]>
Auto-Submit: Michael Stapelberg <[email protected]>
LUCI-TryBot-Result: Go LUCI <[email protected]>
  • Loading branch information
jmhodges authored and gopherbot committed Jan 4, 2024
1 parent 56dad28 commit 7b78149
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion internal/impl/message_reflect_field.go
Original file line number Diff line number Diff line change
Expand Up @@ -538,6 +538,6 @@ func isZero(v reflect.Value) bool {
}
return true
default:
panic(&reflect.ValueError{"reflect.Value.IsZero", v.Kind()})
panic(&reflect.ValueError{Method: "reflect.Value.IsZero", Kind: v.Kind()})
}
}

0 comments on commit 7b78149

Please sign in to comment.