func (g *irgen) tpkg(typ types2.Type) *types.Pkg {
	if obj := anyObj(typ); obj != nil {
		return g.pkg(obj.Pkg())
	}
	return types.LocalPkg
}
// tpkg returns the package that a function, interface, struct, or typeparam type
// expression appeared in.
//
// Caveat: For the degenerate types "func()", "interface{}", and
// "struct{}", tpkg always returns LocalPkg. However, we only need the
// package information so that go/types can report it via its API, and
// the reason we fail to return the original package for these
// particular types is because go/types does *not* report it for
// them. So in practice this limitation is probably moot.
tpkg returns the package that a function, interface, struct, or typeparam type
expression appeared in.

For the degenerate types "func()", "interface{}", and
"struct{}", tpkg always returns LocalPkg. However, we only need the
package information so that go/types can report it via its API, and
the reason we fail to return the original package for these
particular types is because go/types does *not* report it for
them. So in practice this limitation is probably moot.
// tpkg returns the package that a function interface struct or typeparam type // expression appeared in . // // Caveat : For the degenerate types " func () " " interface {} " and // " struct {} " tpkg always returns LocalPkg . However we only need the // package information so that go / types can report it via its API and // the reason we fail to return the original package for these // particular types is because go / types does * not * report it for // them . So in practice this limitation is probably moot .
func (g *irgen) tpkg(typ types2.Type) *types.Pkg {
	if obj := anyObj(typ); obj != nil {
		return g.pkg(obj.Pkg())
	}
	return types.LocalPkg
}
func ( g * irgen ) tpkg ( typ types2 . Type ) * types . Pkg { if obj := anyObj ( typ ) ; obj != nil { return g . pkg ( obj . Pkg ( ) ) } return types . LocalPkg }
tpkg returns the package that a function, interface, struct, or typeparam type
expression appeared in.
tpkg returns the package that a function interface struct or typeparam type expression appeared in .