interp: fix type check of methods with a receiver of interface kind

Fixes #1280.
This commit is contained in:
Marc Vertes
2021-10-08 17:44:09 +02:00
committed by GitHub
parent e56db3b82e
commit 5bf4daef2d
2 changed files with 31 additions and 1 deletions

View File

@@ -1071,7 +1071,7 @@ func (t *itype) in(i int) *itype {
return t.arg[i]
case valueT:
if t.rtype.Kind() == reflect.Func {
if t.recv != nil {
if t.recv != nil && !isInterface(t.recv) {
i++
}
if t.rtype.IsVariadic() && i == t.rtype.NumIn()-1 {