You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The Data fields contains object-specific data:
Kind Data type Data value
Pkg *types.Package package scope
Con int iota for the respective declaration
Con != nil constant value
Typ *Scope (used as method scope during type checking - transient)
The text was updated successfully, but these errors were encountered:
Please answer these questions before submitting your issue. Thanks!
What version of Go are you using (
go version
)?What operating system and processor architecture are you using (
go env
)?What did you do?
What did you expect to see?
An up-to-date doc about
ast.Object.Data
.It seems that:
obj.Kind == Pkg
,obj.Data
is an*ast.Scope
.go/src/go/ast/resolve.go
Line 136 in 964639c
obj.Kind == Con
,obj.Data
is alwaysint
which is iota for the respective declaration.go/src/go/parser/parser.go
Line 2312 in 2808f1f
obj.Kind == Typ
,obj.Data
is not used.The behavior seems to have diverged from the doc at https://codereview.appspot.com/7058060 and https://codereview.appspot.com/7096048 .
What did you see instead?
Document saying:
The text was updated successfully, but these errors were encountered: