1
0
mirror of https://github.com/golang/go synced 2024-11-24 01:00:15 -07:00

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 <khr@golang.org>
TryBot-Result: Gopher Robot <gobot@golang.org>
Reviewed-by: David Chase <drchase@google.com>
Reviewed-by: Keith Randall <khr@google.com>
Auto-Submit: Keith Randall <khr@google.com>
This commit is contained in:
Keith Randall 2022-05-08 08:32:07 -07:00 committed by Gopher Robot
parent a131fd1313
commit eed77574d0

View File

@ -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.