Rietveld Code Review Tool
Help | Bug tracker | Discussion group | Source code | Sign in
(4184)

Issue 136090043: code review 136090043: go.tools/go/types: add (*PkgName).ImportedPackage method. (Closed)

Can't Edit
Can't Publish+Mail
Start Review
Created:
9 years, 7 months ago by adonovan
Modified:
9 years, 7 months ago
Reviewers:
gri
CC:
gri, golang-codereviews
Visibility:
Public.

Description

go.tools/go/types: add (*PkgName).ImportedPackage method. It returns the value formerly returned by Pkg(), i.e. the imported package. Pkg() now returns the package enclosing the import statement, which is consistent with all other Objects. Fixes issue 8628.

Patch Set 1 #

Patch Set 2 : diff -r d37bfb5c5ae7ed21715ffa38d14587d24d653f71 https://code.google.com/p/go.tools #

Patch Set 3 : diff -r d37bfb5c5ae7ed21715ffa38d14587d24d653f71 https://code.google.com/p/go.tools #

Total comments: 2

Patch Set 4 : diff -r d37bfb5c5ae7ed21715ffa38d14587d24d653f71 https://code.google.com/p/go.tools #

Total comments: 4

Patch Set 5 : diff -r d37bfb5c5ae7ed21715ffa38d14587d24d653f71 https://code.google.com/p/go.tools #

Unified diffs Side-by-side diffs Delta from patch set Stats (+21 lines, -16 lines) Patch
M go/types/call.go View 1 1 chunk +2 lines, -2 lines 0 comments Download
M go/types/object.go View 1 2 3 4 2 chunks +8 lines, -3 lines 0 comments Download
M go/types/resolver.go View 1 2 3 2 chunks +2 lines, -2 lines 0 comments Download
M godoc/analysis/typeinfo.go View 1 2 3 1 chunk +2 lines, -2 lines 0 comments Download
M oracle/describe.go View 1 2 3 2 chunks +3 lines, -3 lines 0 comments Download
M oracle/referrers.go View 1 2 3 1 chunk +4 lines, -4 lines 0 comments Download

Messages

Total messages: 6
adonovan
Hello gri@golang.org (cc: golang-codereviews@googlegroups.com), I'd like you to review this change to https://code.google.com/p/go.tools
9 years, 7 months ago (2014-09-02 19:31:05 UTC) #1
gri
https://codereview.appspot.com/136090043/diff/40001/go/types/object.go File go/types/object.go (right): https://codereview.appspot.com/136090043/diff/40001/go/types/object.go#newcode126 go/types/object.go:126: func (obj *PkgName) ImportedPackage() *Package { return obj.imported } ...
9 years, 7 months ago (2014-09-02 20:19:30 UTC) #2
adonovan
Hello gri@golang.org (cc: golang-codereviews@googlegroups.com), Please take another look.
9 years, 7 months ago (2014-09-02 20:32:23 UTC) #3
gri
LGTM did you check the go/importer tests https://codereview.appspot.com/136090043/diff/2/go/types/object.go File go/types/object.go (right): https://codereview.appspot.com/136090043/diff/2/go/types/object.go#newcode125 go/types/object.go:125: // It ...
9 years, 7 months ago (2014-09-02 22:03:25 UTC) #4
adonovan
I ran the go/importer tests. https://codereview.appspot.com/136090043/diff/2/go/types/object.go File go/types/object.go (right): https://codereview.appspot.com/136090043/diff/2/go/types/object.go#newcode125 go/types/object.go:125: // It is never ...
9 years, 7 months ago (2014-09-02 22:11:53 UTC) #5
adonovan
9 years, 7 months ago (2014-09-02 22:12:10 UTC) #6
*** Submitted as
https://code.google.com/p/go/source/detail?r=b0670ff99296&repo=tools ***

go.tools/go/types: add (*PkgName).ImportedPackage method.

It returns the value formerly returned by Pkg(), i.e. the imported package.
Pkg() now returns the package enclosing the import statement,
which is consistent with all other Objects.

Fixes issue 8628.

LGTM=gri
R=gri
CC=golang-codereviews
https://codereview.appspot.com/136090043
Sign in to reply to this message.

Powered by Google App Engine
RSS Feeds Recent Issues | This issue
This is Rietveld f62528b