Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

go/types: incorrect Info.Uses map entry for struct { a } where a is an alias #17778

alandonovan opened this issue Nov 3, 2016 · 2 comments


Copy link

@alandonovan alandonovan commented Nov 3, 2016

The Uses map entry for struct { a } ought to be the Alias object for type alias a, not its original type.
However, the logic in (*Checker).structType calls recordUse on the TypeName derived from the computed type of the field, rather than the object (type or type alias) with which the field is declared.

In at least some cases, such as a simple ident, the recordUse call made by the add function within structType is redundant, since check.typeExpr(f.Type) already calls recordUse.

Copy link

@gopherbot gopherbot commented Nov 3, 2016

CL mentions this issue.


@quentinmit quentinmit added this to the Go1.8 milestone Nov 4, 2016
Copy link

@griesemer griesemer commented Nov 4, 2016

Decision to back out current alias implementation. See #16339. Closing.

See also:


@griesemer griesemer closed this Nov 4, 2016
@golang golang locked and limited conversation to collaborators Nov 5, 2017
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
None yet
Linked pull requests

Successfully merging a pull request may close this issue.

None yet
4 participants