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>
}
// 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]
}
}
// 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]
}