From eed77574d029e8c8426195bc9e7267462f568a8a Mon Sep 17 00:00:00 2001 From: Keith Randall Date: Sun, 8 May 2022 08:32:07 -0700 Subject: [PATCH] cmd/compile: trying to linkname a method is not an ICE, just an error Fixes #52774 Change-Id: I853f462146d10e44a35e5a8716d41f32b6052fd5 Reviewed-on: https://go-review.googlesource.com/c/go/+/404936 Run-TryBot: Keith Randall TryBot-Result: Gopher Robot Reviewed-by: David Chase Reviewed-by: Keith Randall Auto-Submit: Keith Randall --- src/cmd/compile/internal/ssagen/abi.go | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/cmd/compile/internal/ssagen/abi.go b/src/cmd/compile/internal/ssagen/abi.go index e14f080a85..1e8ab54a4c 100644 --- a/src/cmd/compile/internal/ssagen/abi.go +++ b/src/cmd/compile/internal/ssagen/abi.go @@ -281,7 +281,8 @@ func makeABIWrapper(f *ir.Func, wrapperABI obj.ABI) { // below to handle the receiver. Panic if we see this scenario. ft := f.Nname.Type() if ft.NumRecvs() != 0 { - panic("makeABIWrapper support for wrapping methods not implemented") + base.ErrorfAt(f.Pos(), "makeABIWrapper support for wrapping methods not implemented") + return } // Reuse f's types.Sym to create a new ODCLFUNC/function. -- 2.48.1