4.4.4-11 泛型类型
type TypeParam struct {
check *Checker // for lazy type bound completion
id uint64 // unique id
obj *TypeName //
index int // parameter index
bound Type // *Named or *Interface; underlying type is always *Interface
}type instance struct {
check *Checker // for lazy instantiation
pos syntax.Pos // position of type instantiation; for error reporting only
base *Named // parameterized type to be instantiated
targs []Type // type arguments
poslist []syntax.Pos // position of each targ; for error reporting only
value Type // base(targs...) after instantiation or Typ[Invalid]; nil if not yet set
}
type bottom struct{}
type top struct{}最后更新于