From 42884d752400a706939f774a3ba7faf8879d966d Mon Sep 17 00:00:00 2001 From: Ian Lance Taylor Date: Wed, 25 Mar 2020 21:20:11 -0700 Subject: [PATCH] go/types: support setting the TArgs of a types.Named Change-Id: I468b77165079ab30844e54b4988717be452cb648 --- src/go/types/type.go | 3 +++ 1 file changed, 3 insertions(+) diff --git a/src/go/types/type.go b/src/go/types/type.go index 97a6d22189..8b4e999f7f 100644 --- a/src/go/types/type.go +++ b/src/go/types/type.go @@ -522,6 +522,9 @@ func (t *Named) TParams() []*TypeName { return t.tparams } // 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 Named. +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.methods) }