Skip to content

Commit

Permalink
reflect: document StructOf embedded fields limitation
Browse files Browse the repository at this point in the history
This CL documents that StructOf currently does not generate wrapper
methods for embedded fields.

Updates golang#15924

Change-Id: I932011b1491d68767709559f515f699c04ce70d4
Reviewed-on: https://go-review.googlesource.com/23681
Reviewed-by: David Crawshaw <[email protected]>
  • Loading branch information
sbinet authored and crawshaw committed Jun 2, 2016
1 parent 14968bc commit 905ced0
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions src/reflect/type.go
Original file line number Diff line number Diff line change
Expand Up @@ -2351,6 +2351,9 @@ type structTypeFixed32 struct {
// StructOf returns the struct type containing fields.
// The Offset and Index fields are ignored and computed as they would be
// by the compiler.
//
// StructOf currently does not generate wrapper methods for embedded fields.
// This limitation may be lifted in a future version.
func StructOf(fields []StructField) Type {
var (
hash = fnv1(0, []byte("struct {")...)
Expand Down

0 comments on commit 905ced0

Please sign in to comment.