From 7308d747e7914b1dbb446988c2094f96b8e5116d Mon Sep 17 00:00:00 2001 From: Rob Findley Date: Mon, 9 Aug 2021 13:39:32 -0400 Subject: [dev.typeparams] cmd/compile/internal/types2: remove Named.SetTArgs Calling SetTArgs without substituting can leave the type in incoherent state, so we should avoid exposing this API unless necessary. Since it is currently not used by the importer(s), it is probably not necessary to expose for 1.18, so remove it. Change-Id: I06bd7b5bbfacd3c65e2e66a9d5980f20cd1c10c1 Reviewed-on: https://go-review.googlesource.com/c/go/+/341290 Trust: Robert Findley Run-TryBot: Robert Findley TryBot-Result: Go Bot Reviewed-by: Robert Griesemer --- src/cmd/compile/internal/types2/named.go | 3 --- 1 file changed, 3 deletions(-) diff --git a/src/cmd/compile/internal/types2/named.go b/src/cmd/compile/internal/types2/named.go index e099660481..adf3eb3822 100644 --- a/src/cmd/compile/internal/types2/named.go +++ b/src/cmd/compile/internal/types2/named.go @@ -128,9 +128,6 @@ func (t *Named) SetTParams(tparams []*TypeName) { t.load().tparams = bindTParams // TArgs returns the type arguments after instantiation of the named type t, or nil if not instantiated. func (t *Named) TArgs() []Type { return t.targs } -// 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) } -- cgit v1.2.3-54-g00ecf