From: Keith Randall Date: Sun, 8 May 2022 15:32:07 +0000 (-0700) Subject: cmd/compile: trying to linkname a method is not an ICE, just an error X-Git-Tag: go1.19beta1~364 X-Git-Url: http://www.git.cypherpunks.su/?a=commitdiff_plain;h=eed77574d029e8c8426195bc9e7267462f568a8a;p=gostls13.git 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 --- 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.