From: Matthew Dempsky Date: Fri, 27 Aug 2021 00:48:01 +0000 (-0700) Subject: cmd/compile/internal/types: add Type.OrigSym getter/setters X-Git-Tag: go1.18beta1~1597 X-Git-Url: http://www.git.cypherpunks.su/?a=commitdiff_plain;h=68ecdc2c70544c303aa923139a5f16caf107d955;p=gostls13.git cmd/compile/internal/types: add Type.OrigSym getter/setters Will be used in the next CL, so that Type.OrigSym can be unexported. Change-Id: I085f2a886abd419343c7ec7e4ae18c19de1fbbd4 Reviewed-on: https://go-review.googlesource.com/c/go/+/345484 Trust: Matthew Dempsky Run-TryBot: Matthew Dempsky TryBot-Result: Go Bot Reviewed-by: Cuong Manh Le --- diff --git a/src/cmd/compile/internal/types/type.go b/src/cmd/compile/internal/types/type.go index 7861effcb2..c7c8a53654 100644 --- a/src/cmd/compile/internal/types/type.go +++ b/src/cmd/compile/internal/types/type.go @@ -243,6 +243,11 @@ func (t *Type) Kind() Kind { return t.kind } func (t *Type) Sym() *Sym { return t.sym } func (t *Type) SetSym(sym *Sym) { t.sym = sym } +// OrigSym returns the name of the original generic type that t is an +// instantiation of, if any. +func (t *Type) OrigSym_() *Sym { return t.OrigSym } +func (t *Type) SetOrigSym(sym *Sym) { t.OrigSym = sym } + // Underlying returns the underlying type of type t. func (t *Type) Underlying() *Type { return t.underlying }