]> Cypherpunks repositories - gostls13.git/commit
go/types: add Func.Signature method
authorAlan Donovan <adonovan@google.com>
Tue, 20 Feb 2024 15:24:21 +0000 (10:24 -0500)
committerAlan Donovan <adonovan@google.com>
Thu, 18 Apr 2024 22:17:27 +0000 (22:17 +0000)
commit01064622a21f921a54c4442ef9f5436c89e998c7
tree70afcc4ef2212f3b90c36d8fc5237faf72e3ce8a
parentdfc86e922cd033155339c22aff64e109f6c8cc89
go/types: add Func.Signature method

Unfortunately we can't enforce the repr invariant
that Func.typ != nil without thinking about the
object color invariants. For now, return a trivial
Signature if typ == nil, which should never happen
in bug-free client code.

Fixes golang/go#65772

Change-Id: I7f89c6d8fdc8dcd4b8880572e54bb0ed9b6136eb
Reviewed-on: https://go-review.googlesource.com/c/go/+/565375
Commit-Queue: Robert Griesemer <gri@google.com>
Reviewed-by: Robert Findley <rfindley@google.com>
Reviewed-by: Robert Griesemer <gri@google.com>
LUCI-TryBot-Result: Go LUCI <golang-scoped@luci-project-accounts.iam.gserviceaccount.com>
api/next/65772.txt [new file with mode: 0644]
doc/next/6-stdlib/99-minor/go/types/65772.md [new file with mode: 0644]
src/cmd/compile/internal/types2/object.go
src/cmd/compile/internal/types2/subst.go
src/go/types/api_test.go
src/go/types/issues_test.go
src/go/types/object.go
src/go/types/resolver.go
src/go/types/subst.go