diff --git a/src/go/types/api.go b/src/go/types/api.go index 8c0d9d22bf2..30f8ded744a 100644 --- a/src/go/types/api.go +++ b/src/go/types/api.go @@ -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 } diff --git a/src/go/types/api_typeparams_test.go b/src/go/types/api_typeparams_test.go index 15c9bf09f9d..517c58505b5 100644 --- a/src/go/types/api_typeparams_test.go +++ b/src/go/types/api_typeparams_test.go @@ -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 } diff --git a/src/go/types/sanitize.go b/src/go/types/sanitize.go index 727ec173eac..f167cdd8b63 100644 --- a/src/go/types/sanitize.go +++ b/src/go/types/sanitize.go @@ -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 } }