4.4.4-7 Named 类型
type Named struct {
check *Checker // for Named.under implementation
info typeInfo
obj *TypeName // corresponding declared object
orig Type // type (on RHS of declaration) this *Named type is derived of (for cycle reporting)
underlying Type // possibly a *Named during setup; never a *Named once set up completely
tparams []*TypeName // 类型参数名字,用于泛型
targs []Type // 类型参数的限定类型(constraint)
methods []*Func // 与该类型绑定的方法
}最后更新于