[dev.typeparams] go/types: rename Inferred.Targs to TArgs

This is consistent with Named.TArgs.

Change-Id: Ib25f7ac5b7242e169c8c1701dfa407f763f26125
Reviewed-on: https://go-review.googlesource.com/c/go/+/321289
Trust: Robert Findley <rfindley@google.com>
Run-TryBot: Robert Findley <rfindley@google.com>
TryBot-Result: Go Bot <gobot@golang.org>
Reviewed-by: Robert Griesemer <gri@golang.org>
This commit is contained in:
Rob Findley 2021-05-19 15:51:45 -04:00 committed by Robert Findley
parent 298149a915
commit 410fa4c75b
3 changed files with 4 additions and 4 deletions

View File

@ -255,7 +255,7 @@ func (tv TypeAndValue) HasOk() bool {
// _Inferred reports the _Inferred type arguments and signature
// for a parameterized function call that uses type inference.
type _Inferred struct {
Targs []Type
TArgs []Type
Sig *Signature
}

View File

@ -109,7 +109,7 @@ func TestInferredInfo(t *testing.T) {
panic(fmt.Sprintf("unexpected call expression type %T", call))
}
if ExprString(fun) == test.fun {
targs = inf.Targs
targs = inf.TArgs
sig = inf.Sig
break
}

View File

@ -27,9 +27,9 @@ func sanitizeInfo(info *Info) {
inferred := getInferred(info)
for e, inf := range inferred {
changed := false
for i, targ := range inf.Targs {
for i, targ := range inf.TArgs {
if typ := s.typ(targ); typ != targ {
inf.Targs[i] = typ
inf.TArgs[i] = typ
changed = true
}
}