]> Cypherpunks repositories - gostls13.git/commit
go/types, types2: don't register interface methods in Info.Types map
authorRobert Griesemer <gri@golang.org>
Tue, 7 Jan 2025 18:15:19 +0000 (10:15 -0800)
committerGopher Robot <gobot@golang.org>
Mon, 3 Feb 2025 16:21:20 +0000 (08:21 -0800)
commit4ac729283c807cdbe0f6c7041f21606019b722cf
tree8c483793977fe45709eb9ce885b1b5eca07dc13b
parentb25b5f3ff4e671aa4f5897c788137fe91f62cf57
go/types, types2: don't register interface methods in Info.Types map

Methods declared in an interface have a signature and FuncType in the
AST, but they do not express a syntactic function type expression.
Treat them like ordinary function/method declarations and do not record
them in the Info.Types map. This removes an inconsistency in the way
function types are recorded.

Follow-up on CL 640776.

For #70908.

Change-Id: I60848f209b40b008039c014fb8b7b279361487b9
Reviewed-on: https://go-review.googlesource.com/c/go/+/640596
LUCI-TryBot-Result: Go LUCI <golang-scoped@luci-project-accounts.iam.gserviceaccount.com>
Reviewed-by: Robert Griesemer <gri@google.com>
Auto-Submit: Robert Griesemer <gri@google.com>
Reviewed-by: Alan Donovan <adonovan@google.com>
src/cmd/compile/internal/types2/interface.go
src/go/types/interface.go