From: Robert Griesemer Date: Tue, 29 Oct 2019 20:56:42 +0000 (-0700) Subject: go/types: clarify documentation X-Git-Tag: go1.14beta1~504 X-Git-Url: http://www.git.cypherpunks.su/?a=commitdiff_plain;h=20d621d2533b0b7ad5a57a68c298f978b4fc02b7;p=gostls13.git go/types: clarify documentation 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 --- diff --git a/src/go/types/scope.go b/src/go/types/scope.go index 409b468f20..8c9d9ab8b8 100644 --- a/src/go/types/scope.go +++ b/src/go/types/scope.go @@ -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 { diff --git a/src/go/types/selection.go b/src/go/types/selection.go index 124e0d39f0..6ec69d21db 100644 --- a/src/go/types/selection.go +++ b/src/go/types/selection.go @@ -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