mirror of
https://github.com/golang/go
synced 2024-11-26 04:58:00 -07:00
[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:
parent
298149a915
commit
410fa4c75b
@ -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
|
||||
}
|
||||
|
||||
|
@ -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
|
||||
}
|
||||
|
@ -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
|
||||
}
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user