From 01064622a21f921a54c4442ef9f5436c89e998c7 Mon Sep 17 00:00:00 2001 From: Alan Donovan Date: Tue, 20 Feb 2024 10:24:21 -0500 Subject: 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 Reviewed-by: Robert Findley Reviewed-by: Robert Griesemer LUCI-TryBot-Result: Go LUCI --- api/next/65772.txt | 1 + 1 file changed, 1 insertion(+) create mode 100644 api/next/65772.txt (limited to 'api') diff --git a/api/next/65772.txt b/api/next/65772.txt new file mode 100644 index 0000000000..1244df8dd3 --- /dev/null +++ b/api/next/65772.txt @@ -0,0 +1 @@ +pkg go/types, method (*Func) Signature() *Signature #65772 -- cgit v1.2.3-54-g00ecf