{"action":"opened","issue":{"url":"https://api.github.com/repos/golang/go/issues/25403","repository_url":"https://api.github.com/repos/golang/go","labels_url":"https://api.github.com/repos/golang/go/issues/25403/labels{/name}","comments_url":"https://api.github.com/repos/golang/go/issues/25403/comments","events_url":"https://api.github.com/repos/golang/go/issues/25403/events","html_url":"https://github.com/golang/go/issues/25403","id":323298172,"number":25403,"title":"reflect: the string representation of the type with anonymous fields and created by StructOf looks the fields are not anonymous","user":{"login":"dotaheor","id":25079101,"avatar_url":"https://avatars3.githubusercontent.com/u/25079101?v=4","gravatar_id":"","url":"https://api.github.com/users/dotaheor","html_url":"https://github.com/dotaheor","followers_url":"https://api.github.com/users/dotaheor/followers","following_url":"https://api.github.com/users/dotaheor/following{/other_user}","gists_url":"https://api.github.com/users/dotaheor/gists{/gist_id}","starred_url":"https://api.github.com/users/dotaheor/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/dotaheor/subscriptions","organizations_url":"https://api.github.com/users/dotaheor/orgs","repos_url":"https://api.github.com/users/dotaheor/repos","events_url":"https://api.github.com/users/dotaheor/events{/privacy}","received_events_url":"https://api.github.com/users/dotaheor/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":0,"created_at":"2018-05-15T16:44:18Z","updated_at":"2018-05-15T16:44:18Z","closed_at":null,"author_association":"NONE","body":"Please answer these questions before submitting your issue. Thanks!\r\n\r\n\r\n### What version of Go are you using (`go version`)?\r\n\r\ngo version go1.10.2 linux/amd64\r\n\r\n### Does this issue reproduce with the latest release?\r\n\r\nyes\r\n\r\n### What did you do?\r\n\r\n```\r\npackage main\r\n\r\nimport \"fmt\"\r\nimport \"reflect\"\r\n\r\ntype MyInt int\r\n\r\nfunc main() {\r\n\ttype T = struct {\r\n\t\tMyInt\r\n\t}\r\n\tfmt.Println(reflect.TypeOf(T{})) // struct { main.MyInt }\r\n\t\r\n\tvar n MyInt\r\n\ttn := reflect.TypeOf(n)\r\n\t// panic: reflect.StructOf: too many methods\r\n\ttt := reflect.StructOf([]reflect.StructField{\r\n\t\t{Name: \"MyInt\", Type: tn, Anonymous: true},\r\n\t})\r\n\tfmt.Println(tt) // struct { MyInt main.MyInt }\r\n}\r\n```\r\n\r\n### What did you expect to see?\r\n\r\n```\r\nstruct { main.MyInt }\r\nstruct { main.MyInt }\r\n```\r\n\r\n### What did you see instead?\r\n\r\n```\r\nstruct { main.MyInt }\r\nstruct { MyInt main.MyInt }\r\n```"}}
{"actor":{"display_login":"dotaheor"}}