Skip to content

Commit

Permalink
go/types: clarify documentation
Browse files Browse the repository at this point in the history
For a discussion, see the issue.

Fixes #35189.

Change-Id: I46c87a45bddf2ea8c33bc101d58880b7922e0f78
Reviewed-on: https://go-review.googlesource.com/c/go/+/204044
Reviewed-by: Dmitri Shuralyov <dmitshur@golang.org>
  • Loading branch information
griesemer committed Oct 29, 2019
1 parent 70331a3 commit 20d621d
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 5 deletions.
2 changes: 1 addition & 1 deletion src/go/types/scope.go
Expand Up @@ -77,7 +77,7 @@ func (s *Scope) Lookup(name string) Object {
//
// Note that obj.Parent() may be different from the returned scope if the
// object was inserted into the scope and already had a parent at that
// time (see Insert, below). This can only happen for dot-imported objects
// time (see Insert). This can only happen for dot-imported objects
// whose scope is the scope of the package that exported them.
func (s *Scope) LookupParent(name string, pos token.Pos) (*Scope, Object) {
for ; s != nil; s = s.parent {
Expand Down
8 changes: 4 additions & 4 deletions src/go/types/selection.go
Expand Up @@ -31,11 +31,11 @@ const (
//
// the following relations exist:
//
// Selector Kind Recv Obj Type Index Indirect
// Selector Kind Recv Obj Type Index Indirect
//
// p.x FieldVal T x int {0} true
// p.m MethodVal *T m func (e *T) m() {1, 0} true
// T.m MethodExpr T m func m(_ T) {1, 0} false
// p.x FieldVal T x int {0} true
// p.m MethodVal *T m func() {1, 0} true
// T.m MethodExpr T m func(T) {1, 0} false
//
type Selection struct {
kind SelectionKind
Expand Down

0 comments on commit 20d621d

Please sign in to comment.