X-Git-Url: http://www.git.cypherpunks.ru/?a=blobdiff_plain;f=src%2Fgo%2Ftypes%2Fsignature.go;h=e7a348d8510ee713a7bf7ff77046dcb2d45a9ea1;hb=bea55136b2d50fc514ddfba4380311295975a660;hp=e34db602f3e6c95f72b2b9faf04e767b79460660;hpb=1b03ec8a25412342ca072c0860bdf046d58e82ac;p=gostls13.git diff --git a/src/go/types/signature.go b/src/go/types/signature.go index e34db602f3..e7a348d851 100644 --- a/src/go/types/signature.go +++ b/src/go/types/signature.go @@ -211,13 +211,14 @@ func (check *Checker) funcType(sig *Signature, recvPar *ast.FieldList, ftyp *ast check.later(func() { // spec: "The receiver type must be of the form T or *T where T is a type name." rtyp, _ := deref(recv.typ) - if !isValid(rtyp) { + atyp := _Unalias(rtyp) + if !isValid(atyp) { return // error was reported before } // spec: "The type denoted by T is called the receiver base type; it must not // be a pointer or interface type and it must be declared in the same package // as the method." - switch T := rtyp.(type) { + switch T := atyp.(type) { case *Named: // The receiver type may be an instantiated type referred to // by an alias (which cannot have receiver parameters for now).