]> Cypherpunks repositories - gostls13.git/commit
[dev.typeparams] go/types: use the TParams API consistently
authorRob Findley <rfindley@google.com>
Wed, 21 Jul 2021 15:26:00 +0000 (11:26 -0400)
committerRobert Findley <rfindley@google.com>
Thu, 22 Jul 2021 17:24:27 +0000 (17:24 +0000)
commit5ba06495c1ab2c0e7f6e25260d1f92b5008c380e
tree0236c557050f07a461466c46c365364089b107c5
parent6f57139c7a6bc776f1335aca13d276d36343cf7c
[dev.typeparams] go/types: use the TParams API consistently

Even internally to the type checker, we should use the TParams and
RParams methods instead of accessing fields directly, as TParams may be
lazily expanded, and in the future we may want to pack receiver and
function type parameters into a single field on Signature.

We should also not differentiate a nil *TParamList from an empty
*TParamList.

Change-Id: I85c616e6c708a89b6a5eb1e69fe0b014276eda90
Reviewed-on: https://go-review.googlesource.com/c/go/+/336251
Trust: Robert Findley <rfindley@google.com>
Run-TryBot: Robert Findley <rfindley@google.com>
Reviewed-by: Robert Griesemer <gri@golang.org>
src/go/types/call.go
src/go/types/decl.go
src/go/types/subst.go
src/go/types/typestring.go