aboutsummaryrefslogtreecommitdiff
path: root/src/cmd
diff options
context:
space:
mode:
authorDaniel Martí <mvdan@mvdan.cc>2025-02-19 22:35:48 +0000
committerGopher Robot <gobot@golang.org>2025-02-19 19:25:33 -0800
commit07a121383c52fc2edb96d4d58d1dd600bc3e7dfd (patch)
treee1ce9b7f82d40d60e93e1c769cf89922ec9c934c /src/cmd
parentcdc95607940b2acb66cb184dec08d4cc8a469042 (diff)
downloadgo-07a121383c52fc2edb96d4d58d1dd600bc3e7dfd.tar.xz
go/*: use go/types.Func.Signature and go/ast.Preorder
In the few obvious candidates that I found after a bit of grepping. Change-Id: I36af79c46d29e4422bce1f43bbbac9db7de2001a Reviewed-on: https://go-review.googlesource.com/c/go/+/650656 Reviewed-by: Alan Donovan <adonovan@google.com> Auto-Submit: Alan Donovan <adonovan@google.com> Commit-Queue: Alan Donovan <adonovan@google.com> Reviewed-by: Cherry Mui <cherryyz@google.com> LUCI-TryBot-Result: Go LUCI <golang-scoped@luci-project-accounts.iam.gserviceaccount.com>
Diffstat (limited to 'src/cmd')
-rw-r--r--src/cmd/api/main_test.go4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/cmd/api/main_test.go b/src/cmd/api/main_test.go
index a0820c2274..ed366be4e7 100644
--- a/src/cmd/api/main_test.go
+++ b/src/cmd/api/main_test.go
@@ -1058,7 +1058,7 @@ func (w *Walker) emitIfaceType(name string, typ *types.Interface) {
if w.isDeprecated(m) {
w.emitf("%s //deprecated", m.Name())
}
- w.emitf("%s%s", m.Name(), w.signatureString(m.Type().(*types.Signature)))
+ w.emitf("%s%s", m.Name(), w.signatureString(m.Signature()))
}
if !complete {
@@ -1088,7 +1088,7 @@ func (w *Walker) emitIfaceType(name string, typ *types.Interface) {
}
func (w *Walker) emitFunc(f *types.Func) {
- sig := f.Type().(*types.Signature)
+ sig := f.Signature()
if sig.Recv() != nil {
panic("method considered a regular function: " + f.String())
}