[dev.typeparams] go/types,cmd/compile/internal/types2: fix TypeParams.At docs

Presumably the "It is safe to call on a nil receiver" comment was
mistakenly copied from TypeParams.Len, which is actually safe to call
on a nil receiver.

Change-Id: Iec5ae32c98dc91ce84a6207b47f2b1e530bdbfe2
Reviewed-on: https://go-review.googlesource.com/c/go/+/338430
Trust: Matthew Dempsky <mdempsky@google.com>
Run-TryBot: Matthew Dempsky <mdempsky@google.com>
Reviewed-by: Robert Griesemer <gri@golang.org>
This commit is contained in:
Matthew Dempsky 2021-07-29 16:01:30 -07:00
parent 1d35d8ffa5
commit 3e7571f6ff
2 changed files with 0 additions and 2 deletions

View file

@ -108,7 +108,6 @@ func (tps *TypeParams) Len() int {
}
// At returns the i'th type parameter in the list.
// It is safe to call on a nil receiver.
func (tps *TypeParams) At(i int) *TypeName {
return tps.list()[i]
}

View file

@ -98,7 +98,6 @@ func (tps *TypeParams) Len() int {
}
// At returns the i'th type parameter in the list.
// It is safe to call on a nil receiver.
func (tps *TypeParams) At(i int) *TypeName {
return tps.list()[i]
}