From 68ecdc2c70544c303aa923139a5f16caf107d955 Mon Sep 17 00:00:00 2001 From: Matthew Dempsky Date: Thu, 26 Aug 2021 17:48:01 -0700 Subject: [PATCH] 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 --- src/cmd/compile/internal/types/type.go | 5 +++++ 1 file changed, 5 insertions(+) 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 } -- 2.51.0