aboutsummaryrefslogtreecommitdiff
path: root/src/cmd/compile/internal/types2/call.go
diff options
context:
space:
mode:
authorRobert Griesemer <gri@golang.org>2021-07-28 15:38:28 -0700
committerRobert Griesemer <gri@golang.org>2021-07-29 21:05:47 +0000
commit46cc68638143770206e0894add7021990a9bec52 (patch)
tree0759462e177fb11bca46c6d17f3cc498e096ddb0 /src/cmd/compile/internal/types2/call.go
parent27552e9172c5a9f7bbd8428c6e30eac14bb5e0b0 (diff)
downloadgo-46cc68638143770206e0894add7021990a9bec52.tar.gz
go-46cc68638143770206e0894add7021990a9bec52.zip
[dev.typeparams] cmd/compile/internal/types2: use the TParams API consistently
This is a clean port of CL 336251. Change-Id: I08415c3e9b6cef33594e7d56c4115ddde8030381 Reviewed-on: https://go-review.googlesource.com/c/go/+/338193 Trust: Robert Griesemer <gri@golang.org> Run-TryBot: Robert Griesemer <gri@golang.org> Reviewed-by: Robert Findley <rfindley@google.com>
Diffstat (limited to 'src/cmd/compile/internal/types2/call.go')
-rw-r--r--src/cmd/compile/internal/types2/call.go4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/cmd/compile/internal/types2/call.go b/src/cmd/compile/internal/types2/call.go
index dee49b44a4..e1acf50213 100644
--- a/src/cmd/compile/internal/types2/call.go
+++ b/src/cmd/compile/internal/types2/call.go
@@ -57,7 +57,7 @@ func (check *Checker) funcInst(x *operand, inst *syntax.IndexExpr) {
// instantiate function signature
res := check.Instantiate(x.Pos(), sig, targs, poslist, true).(*Signature)
- assert(res.tparams == nil) // signature is not generic anymore
+ assert(res.TParams().Len() == 0) // signature is not generic anymore
if inferred {
check.recordInferred(inst, targs, res)
}
@@ -327,7 +327,7 @@ func (check *Checker) arguments(call *syntax.CallExpr, sig *Signature, targs []T
// compute result signature
rsig = check.Instantiate(call.Pos(), sig, targs, nil, true).(*Signature)
- assert(rsig.tparams == nil) // signature is not generic anymore
+ assert(rsig.TParams().Len() == 0) // signature is not generic anymore
check.recordInferred(call, targs, rsig)
// Optimization: Only if the parameter list was adjusted do we