From 8e263c554df09bb0dbc0774043235825ef4300d2 Mon Sep 17 00:00:00 2001 From: Alan Donovan Date: Fri, 25 Apr 2014 12:08:31 -0400 Subject: [PATCH] go.tools/go/types: fix incorrect receiver in (*Selection).Type(). Method expressions T.f are reported as having type (T)func(T), i.e. T appears twice, as a receiver and a regular parameter. LGTM=gri R=gri CC=golang-codereviews https://golang.org/cl/96780044 --- go/types/selection.go | 1 + 1 file changed, 1 insertion(+) diff --git a/go/types/selection.go b/go/types/selection.go index fe089331..d1dd1c81 100644 --- a/go/types/selection.go +++ b/go/types/selection.go @@ -84,6 +84,7 @@ func (s *Selection) Type() Type { // TODO(gri) Similar code is already in call.go - factor! sig := *s.obj.(*Func).typ.(*Signature) arg0 := *sig.recv + sig.recv = nil arg0.typ = s.recv var params []*Var if sig.params != nil {