summaryrefslogtreecommitdiffstats
path: root/src/cmd/compile
diff options
context:
space:
mode:
authorDaniel Baumann <daniel.baumann@progress-linux.org>2024-05-14 19:14:02 +0000
committerDaniel Baumann <daniel.baumann@progress-linux.org>2024-05-14 19:14:02 +0000
commit9a6b5285ae7925465ef2e9829a83307b3d29ba57 (patch)
treefe6cefb242bcf00248800820635651946683a60f /src/cmd/compile
parentAdding upstream version 1.22.2. (diff)
downloadgolang-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.go3
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 {