[go-nuts] Re: go/types: types.Named hides intermediate names

2019-11-20 Thread Stephen Searles
Thanks for the response. I understand that what I'm asking is a bit beyond the scope of what a *compiler* would need to correctly implement the language, which is what the spec details. The question/request here is more about usability of the types package for purposes that are more human/devel

[go-nuts] go/types: types.Named hides intermediate names

2019-11-19 Thread Stephen Searles
I'm not sure if this could be considered a bug or not, but it's unfortunate behavior for certain patterns of type analysis. The problem is with a type like: type X time.Time When you inspect type X, you find that it is analyzed as a types.Named. Its immediate underlying type is a types.Struct.