CL 594740 rewrote type checking of method receiver types. Because that CL takes apart the receiver "manually" rather than using the regular code for type checking type expressions, type parameters of generic receivers were only recorded in types.Info.Defs. Before the rewrite, they were recorded as Defs, but then also evaluated as part of the receiver type expression; as a result they were also recorded in Info.Uses and Info.Types. This breaks some Google-internal tests.

See also #68639 for a related issue.

cc: @adonovan @findleyr @timothy-king for visibility.

Comment From: gabyhelp

Related Issues and Documentation

(Emoji vote if this was helpful or unhelpful; more detailed feedback welcome in this discussion.)

Comment From: gopherbot

Change https://go.dev/cl/601935 mentions this issue: go/types, types2: record type parameters in receiver expressions as uses