Closed
Description
Please answer these questions before submitting your issue. Thanks!
What version of Go are you using (go version
)?
go version go1.10.2 linux/amd64
Does this issue reproduce with the latest release?
yes
What did you do?
package main
import "fmt"
import "reflect"
import "time"
func main() {
type T = struct {
time.Time
}
fmt.Println(reflect.TypeOf(T{})) // struct { x int }
var n time.Time
tn := reflect.TypeOf(n)
// panic: reflect.StructOf: too many methods
tt := reflect.StructOf([]reflect.StructField{
{Name: "Time", Type: tn, Anonymous: true},
})
fmt.Println(tt)
}
What did you expect to see?
not panic, or document it.
What did you see instead?
panic