diff options
author | Daniel Baumann <daniel.baumann@progress-linux.org> | 2024-05-14 19:14:02 +0000 |
---|---|---|
committer | Daniel Baumann <daniel.baumann@progress-linux.org> | 2024-05-14 19:14:02 +0000 |
commit | 9a6b5285ae7925465ef2e9829a83307b3d29ba57 (patch) | |
tree | fe6cefb242bcf00248800820635651946683a60f /src/cmd/compile | |
parent | Adding upstream version 1.22.2. (diff) | |
download | golang-1.22-9a6b5285ae7925465ef2e9829a83307b3d29ba57.tar.xz golang-1.22-9a6b5285ae7925465ef2e9829a83307b3d29ba57.zip |
Adding upstream version 1.22.3.upstream/1.22.3
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
Diffstat (limited to 'src/cmd/compile')
-rw-r--r-- | src/cmd/compile/internal/noder/unified.go | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/src/cmd/compile/internal/noder/unified.go b/src/cmd/compile/internal/noder/unified.go index 492b00d..562b2e6 100644 --- a/src/cmd/compile/internal/noder/unified.go +++ b/src/cmd/compile/internal/noder/unified.go @@ -120,6 +120,9 @@ func lookupMethod(pkg *types.Pkg, symName string) (*ir.Func, error) { if name.Alias() { return nil, fmt.Errorf("type sym %v refers to alias", typ) } + if name.Type().IsInterface() { + return nil, fmt.Errorf("type sym %v refers to interface type", typ) + } for _, m := range name.Type().Methods() { if m.Sym == meth { |