]> Cypherpunks repositories - gostls13.git/commitdiff
go/types: remove Named.SetTArgs
authorRobert Findley <rfindley@google.com>
Mon, 16 Aug 2021 16:09:56 +0000 (12:09 -0400)
committerRobert Findley <rfindley@google.com>
Mon, 16 Aug 2021 18:44:12 +0000 (18:44 +0000)
This is a port of CL 341290 to go/types; SetTArgs is a potentially
error-prone API.

Change-Id: I484e62d71a0e09be1e19f8e63994912a88364eca
Reviewed-on: https://go-review.googlesource.com/c/go/+/342476
Trust: Robert Findley <rfindley@google.com>
Run-TryBot: Robert Findley <rfindley@google.com>
Reviewed-by: Robert Griesemer <gri@golang.org>
TryBot-Result: Go Bot <gobot@golang.org>

src/go/types/named.go

index 791ab787780e888845fa9c9b97ecba32e97f60f8..208327929f45c498dafce1bab6c411dfab3eebac 100644 (file)
@@ -132,9 +132,6 @@ func (t *Named) NumTArgs() int { return len(t.targs) }
 // TArgs returns the i'th type argument of the named type t for 0 <= i < t.NumTArgs().
 func (t *Named) TArg(i int) Type { return t.targs[i] }
 
-// SetTArgs sets the type arguments of the named type t.
-func (t *Named) SetTArgs(args []Type) { t.targs = args }
-
 // NumMethods returns the number of explicit methods whose receiver is named type t.
 func (t *Named) NumMethods() int { return len(t.load().methods) }