]> Cypherpunks repositories - gostls13.git/commitdiff
go/types: clarify documentation
authorRobert Griesemer <gri@golang.org>
Tue, 29 Oct 2019 20:56:42 +0000 (13:56 -0700)
committerRobert Griesemer <gri@golang.org>
Tue, 29 Oct 2019 22:00:32 +0000 (22:00 +0000)
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>
src/go/types/scope.go
src/go/types/selection.go

index 409b468f20a311c43e0e5db5a12e5f518d3399a7..8c9d9ab8b8010be3674fd948e641048fdfe1d20d 100644 (file)
@@ -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 {
index 124e0d39f02b9150f0d9ff604a141c746d48afaf..6ec69d21dba478e59d43adcdfaa20e61e20e0fb8 100644 (file)
@@ -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