[tools] go/types/typeutil: normalize instantiated callees

0 views
Skip to first unread message

Gopher Robot (Gerrit)

unread,
Jul 24, 2026, 11:30:18 PM (2 days ago) Jul 24
to Karthik Bhat A, Gerrit Bot, goph...@pubsubhelper.golang.org, golang-...@googlegroups.com, Carlos Amedee, golang...@luci-project-accounts.iam.gserviceaccount.com, Alan Donovan, Mark Freeman, golang-co...@googlegroups.com

Gopher Robot submitted the change

Change information

Commit message:
go/types/typeutil: normalize instantiated callees

Callee and StaticCallee promise to return the generic declaration
for instantiated functions and methods. Generic method selections
instead return the synthetic method on the instantiated receiver.

Normalize function results to their Origin so both helpers honor
that contract. Update unusedresult diagnostics to use the generic
receiver name.

Fixes golang/go#80533
Change-Id: Ic0ccc9d09e3aaf5ed8ab8f3dd55fb501a17fc630
GitHub-Last-Rev: 75869bc2c0ab94131bfd25f65aeed139e7d9b072
GitHub-Pull-Request: golang/tools#660
Reviewed-by: Carlos Amedee <car...@golang.org>
Auto-Submit: Alan Donovan <adon...@google.com>
Reviewed-by: Alan Donovan <adon...@google.com>
Files:
  • M go/analysis/passes/unusedresult/testdata/src/typeparams/typeparams.go
  • M go/types/typeutil/callee_test.go
  • M internal/typesinternal/classify_call.go
Change size: M
Delta: 3 files changed, 62 insertions(+), 3 deletions(-)
Branch: refs/heads/master
Submit Requirements:
Open in Gerrit
Inspect html for hidden footers to help with email filtering. To unsubscribe visit settings. DiffyGerrit
Gerrit-MessageType: merged
Gerrit-Project: tools
Gerrit-Branch: master
Gerrit-Change-Id: Ic0ccc9d09e3aaf5ed8ab8f3dd55fb501a17fc630
Gerrit-Change-Number: 804560
Gerrit-PatchSet: 3
Gerrit-Owner: Gerrit Bot <letsus...@gmail.com>
Gerrit-Reviewer: Alan Donovan <adon...@google.com>
Gerrit-Reviewer: Carlos Amedee <car...@golang.org>
Gerrit-Reviewer: Gopher Robot <go...@golang.org>
Gerrit-Reviewer: Mark Freeman <markf...@google.com>
Gerrit-CC: Karthik Bhat A <karthik...@gmail.com>
open
diffy
satisfied_requirement
Reply all
Reply to author
Forward
0 new messages