1
0
mirror of https://github.com/golang/go synced 2024-11-17 06:04:47 -07:00

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 <mdempsky@google.com>
Run-TryBot: Matthew Dempsky <mdempsky@google.com>
TryBot-Result: Go Bot <gobot@golang.org>
Reviewed-by: Cuong Manh Le <cuong.manhle.vn@gmail.com>
This commit is contained in:
Matthew Dempsky 2021-08-26 17:48:01 -07:00
parent 72c003ef82
commit 68ecdc2c70

View File

@ -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 }