cmd/compile/internal/types2: spell out 'Type' in type parameter APIs

This is a port of CL 348376 with the necessary adjustments
in the compiler.

Change-Id: Ib11ee841b194746ff231ee493aa56bf9b3a4a67f
Reviewed-on: https://go-review.googlesource.com/c/go/+/348577
Trust: Robert Griesemer <gri@golang.org>
Run-TryBot: Robert Griesemer <gri@golang.org>
Reviewed-by: Robert Findley <rfindley@google.com>
This commit is contained in:
Robert Griesemer 2021-09-08 15:22:20 -07:00
parent bff39cf6cb
commit f5f8a911d8
22 changed files with 112 additions and 112 deletions

View file

@ -344,7 +344,7 @@ func (g *irgen) selectorExpr(pos src.XPos, typ types2.Type, expr *syntax.Selecto
if wantPtr {
recvType2Base = types2.AsPointer(recvType2).Elem()
}
if types2.AsNamed(recvType2Base).TParams().Len() > 0 {
if types2.AsNamed(recvType2Base).TypeParams().Len() > 0 {
// recvType2 is the original generic type that is
// instantiated for this method call.
// selinfo.Recv() is the instantiated type
@ -395,7 +395,7 @@ func getTargs(selinfo *types2.Selection) *types2.TypeList {
if n == nil {
base.Fatalf("Incorrect type for selinfo %v", selinfo)
}
return n.TArgs()
return n.TypeArgs()
}
func (g *irgen) exprList(expr syntax.Expr) []ir.Node {