func anyObj(typ types2.Type) types2.Object {
	switch typ := typ.(type) {
	case *types2.Signature:
		if recv := typ.Recv(); recv != nil {
			return recv
		}
		if params := typ.Params(); params.Len() > 0 {
			return params.At(0)
		}
		if results := typ.Results(); results.Len() > 0 {
			return results.At(0)
		}
	case *types2.Struct:
		if typ.NumFields() > 0 {
			return typ.Field(0)
		}
	case *types2.Interface:
		if typ.NumExplicitMethods() > 0 {
			return typ.ExplicitMethod(0)
		}
	case *types2.TypeParam:
		return typ.Obj()
	}
	return nil
}
// anyObj returns some object accessible from typ, if any.
anyObj returns some object accessible from typ, if any.
// anyObj returns some object accessible from typ if any .
func anyObj(typ types2.Type) types2.Object {
	switch typ := typ.(type) {
	case *types2.Signature:
		if recv := typ.Recv(); recv != nil {
			return recv
		}
		if params := typ.Params(); params.Len() > 0 {
			return params.At(0)
		}
		if results := typ.Results(); results.Len() > 0 {
			return results.At(0)
		}
	case *types2.Struct:
		if typ.NumFields() > 0 {
			return typ.Field(0)
		}
	case *types2.Interface:
		if typ.NumExplicitMethods() > 0 {
			return typ.ExplicitMethod(0)
		}
	case *types2.TypeParam:
		return typ.Obj()
	}
	return nil
}
func anyObj ( typ types2 . Type ) types2 . Object { switch typ := typ . ( type ) { case * types2 . Signature : if recv := typ . Recv ( ) ; recv != nil { return recv } if params := typ . Params ( ) ; params . Len ( ) > 0 { return params . At ( 0 ) } if results := typ . Results ( ) ; results . Len ( ) > 0 { return results . At ( 0 ) } case * types2 . Struct : if typ . NumFields ( ) > 0 { return typ . Field ( 0 ) } case * types2 . Interface : if typ . NumExplicitMethods ( ) > 0 { return typ . ExplicitMethod ( 0 ) } case * types2 . TypeParam : return typ . Obj ( ) } return nil }
anyObj returns some object accessible from typ, if any.
anyObj returns some object accessible from typ if any .