]> Cypherpunks.ru repositories - gostls13.git/commitdiff
[dev.typeparams] go/types: rename Inferred.Targs to TArgs
authorRob Findley <rfindley@google.com>
Wed, 19 May 2021 19:51:45 +0000 (15:51 -0400)
committerRobert Findley <rfindley@google.com>
Fri, 4 Jun 2021 10:02:50 +0000 (10:02 +0000)
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>
src/go/types/api.go
src/go/types/api_typeparams_test.go
src/go/types/sanitize.go

index 8c0d9d22bf26aa671f6bf65c7676dc2bf806a78a..30f8ded744adcd42d46dd97638aa34002efd6a2f 100644 (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
 }
 
index 15c9bf09f9dfccc8910369422b1218f341535621..517c58505b5a37102990badb1aa7da18947f0f30 100644 (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
                        }
index 727ec173eac81a4077be56e5f1a1affe9372e88b..f167cdd8b63ae113d8a9910a9c90277b0667f3f6 100644 (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
                        }
                }