func (g *irgen) typ(typ types2.Type) *types.Type {
	// Defer the CheckSize calls until we have fully-defined a
	// (possibly-recursive) top-level type.
	types.DeferCheckSize()
	res := g.typ1(typ)
	types.ResumeCheckSize()

	// Finish up any types on typesToFinalize, now that we are at the top of a
	// fully-defined (possibly recursive) type. fillinMethods could create more
	// types to finalize.
	for len(g.typesToFinalize) > 0 {
		l := len(g.typesToFinalize)
		info := g.typesToFinalize[l-1]
		g.typesToFinalize = g.typesToFinalize[:l-1]
		g.fillinMethods(info.typ, info.ntyp)
	}
	return res
}
// typ converts a types2.Type to a types.Type, including caching of previously
// translated types.
typ converts a types2.Type to a types.Type, including caching of previously
translated types.
// typ converts a types2 . Type to a types . Type including caching of previously // translated types .
func (g *irgen) typ(typ types2.Type) *types.Type {
	types.DeferCheckSize()
	res := g.typ1(typ)
	types.ResumeCheckSize()
	for len(g.typesToFinalize) > 0 {
		l := len(g.typesToFinalize)
		info := g.typesToFinalize[l-1]
		g.typesToFinalize = g.typesToFinalize[:l-1]
		g.fillinMethods(info.typ, info.ntyp)
	}
	return res
}
func ( g * irgen ) typ ( typ types2 . Type ) * types . Type { types . DeferCheckSize ( ) res := g . typ1 ( typ ) types . ResumeCheckSize ( ) for len ( g . typesToFinalize ) > 0 { l := len ( g . typesToFinalize ) info := g . typesToFinalize [ l - 1 ] g . typesToFinalize = g . typesToFinalize [ : l - 1 ] g . fillinMethods ( info . typ , info . ntyp ) } return res }
typ converts a types2.Type to a types.Type, including caching of previously
translated types.
typ converts a types2 . Type to a types . Type including caching of previously translated types .
// Defer the CheckSize calls until we have fully-defined a // (possibly-recursive) top-level type. // Finish up any types on typesToFinalize, now that we are at the top of a // fully-defined (possibly recursive) type. fillinMethods could create more // types to finalize.