From 002170fbae88011602918a0d73675bfdb6fe4200 Mon Sep 17 00:00:00 2001 From: Dmitry Vyukov Date: Mon, 14 Apr 2025 08:03:22 +0200 Subject: pkg/declextract: more precise fileops callback resolution Use resolved Function references instead of string names for fileops callback resolution. Function names are not unique, a number of callbacks have the same names. --- pkg/declextract/interface.go | 3 +++ 1 file changed, 3 insertions(+) (limited to 'pkg/declextract/interface.go') diff --git a/pkg/declextract/interface.go b/pkg/declextract/interface.go index a1ba9c137..f386f398b 100644 --- a/pkg/declextract/interface.go +++ b/pkg/declextract/interface.go @@ -175,6 +175,9 @@ func (ctx *context) findFunc(name, file string) *Function { } func (ctx *context) mustFindFunc(name, file string) *Function { + if name == "" { + return nil + } fn := ctx.findFunc(name, file) if fn == nil { panic(fmt.Sprintf("no func %q in %q", name, file)) -- cgit mrf-deployment