]> Cypherpunks repositories - gostls13.git/commit
go/types, types2: expand documentation for Info.Types map
authorRobert Griesemer <gri@golang.org>
Mon, 6 Jan 2025 21:25:08 +0000 (13:25 -0800)
committerGopher Robot <gobot@golang.org>
Tue, 7 Jan 2025 17:56:11 +0000 (09:56 -0800)
commit1d20bce981005777424b9c8da199015ab2148810
treea401da95f207a3e0344603f4f8960170e4788f90
parenta9bd6239a440dedc354f7651259fabef4610ebdc
go/types, types2: expand documentation for Info.Types map

Function types for function (and method) declarations do not
appear in Info.Types maps, only Info.Defs maps, because the
function type is implicit in the declaration and not a proper
(function) type expression. This is true even though the AST
represents these types via an (artificial) FuncType node.

Document this explicitly in the API.

No functional code changes.

Fixes #70908.

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