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: document when selectors have types #11944
Labels
Documentation
FrozenDueToAge
NeedsFix
The path to resolution is known, but the work has not been done.
Milestone
Comments
The information is in the Defs and Uses maps. But I agree that a) the documentation needs to be clearer; and b) the fields may have to show up in TypesAndValues as well (TBD). Here's a more elaborate example:
with the output:
|
It sounds like the fix here is to make the documentation clearer about describing the current behavior. |
rsc
added
the
NeedsFix
The path to resolution is known, but the work has not been done.
label
May 9, 2016
rsc
changed the title
go/types: does not give types to selectors
go/types: document when selectors have types
Nov 2, 2016
CL https://golang.org/cl/32881 mentions this issue. |
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
Labels
Documentation
FrozenDueToAge
NeedsFix
The path to resolution is known, but the work has not been done.
The following program:
outputs:
You can see that selector
f
in expressionx.f
did not get type.It should have a type, when you recursively walk an expression you expect that all subexpressions are typed or constants. But these are completely unindentified.
The spec says that selectors have types; and in fact type of the selector expression itself is determined by type of the selector:
go version devel +b7205b9 Thu Jul 30 05:57:37 2015 +0000 linux/amd64
The text was updated successfully, but these errors were encountered: