diff options
| author | Dmitry Vyukov <dvyukov@google.com> | 2025-04-14 08:03:22 +0200 |
|---|---|---|
| committer | Dmitry Vyukov <dvyukov@google.com> | 2025-04-15 08:30:57 +0000 |
| commit | 002170fbae88011602918a0d73675bfdb6fe4200 (patch) | |
| tree | 49f97d83a242a8b22afca623eb5c336a82500bea /pkg/declextract/interface.go | |
| parent | c7e92da6cb06679b04062786481f50e42c585bfc (diff) | |
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.
Diffstat (limited to 'pkg/declextract/interface.go')
| -rw-r--r-- | pkg/declextract/interface.go | 3 |
1 files changed, 3 insertions, 0 deletions
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)) |
