Skip to content

Commit 20d621d

Browse files
committed
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 <[email protected]>
1 parent 70331a3 commit 20d621d

File tree

2 files changed

+5
-5
lines changed

2 files changed

+5
-5
lines changed

src/go/types/scope.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -77,7 +77,7 @@ func (s *Scope) Lookup(name string) Object {
7777
//
7878
// Note that obj.Parent() may be different from the returned scope if the
7979
// object was inserted into the scope and already had a parent at that
80-
// time (see Insert, below). This can only happen for dot-imported objects
80+
// time (see Insert). This can only happen for dot-imported objects
8181
// whose scope is the scope of the package that exported them.
8282
func (s *Scope) LookupParent(name string, pos token.Pos) (*Scope, Object) {
8383
for ; s != nil; s = s.parent {

src/go/types/selection.go

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -31,11 +31,11 @@ const (
3131
//
3232
// the following relations exist:
3333
//
34-
// Selector Kind Recv Obj Type Index Indirect
34+
// Selector Kind Recv Obj Type Index Indirect
3535
//
36-
// p.x FieldVal T x int {0} true
37-
// p.m MethodVal *T m func (e *T) m() {1, 0} true
38-
// T.m MethodExpr T m func m(_ T) {1, 0} false
36+
// p.x FieldVal T x int {0} true
37+
// p.m MethodVal *T m func() {1, 0} true
38+
// T.m MethodExpr T m func(T) {1, 0} false
3939
//
4040
type Selection struct {
4141
kind SelectionKind

0 commit comments

Comments
 (0)