1
0
mirror of https://github.com/golang/go synced 2024-11-18 17:14:45 -07:00

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
This commit is contained in:
Alan Donovan 2014-04-25 12:08:31 -04:00
parent c288136f0c
commit 8e263c554d

View File

@ -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 {