cmd/compile/internal/types: add Pkg and SetPkg methods to Type
The go/types API exposes what package objects were declared in, which includes struct fields, interface methods, and function parameters. The compiler implicitly tracks these for non-exported identifiers (through the Sym's associated Pkg), but exported identifiers always use localpkg. To simplify identifying this, add an explicit package field to struct, interface, and function types. Change-Id: I6adc5dc653e78f058714259845fb3077066eec82 Reviewed-on: https://go-review.googlesource.com/107622Reviewed-by: Robert Griesemer <gri@golang.org> Reviewed-by: Brad Fitzpatrick <bradfitz@golang.org>
Showing
Please
register
or
sign in
to comment