File tree Expand file tree Collapse file tree 1 file changed +3
-2
lines changed
Expand file tree Collapse file tree 1 file changed +3
-2
lines changed Original file line number Diff line number Diff line change @@ -169,11 +169,12 @@ func (l *Labeler) ScopedObjectID(object types.Object, getTypeLabel func() Label)
169169
170170// findMethodWithGivenReceiver finds a method with `object` as its receiver, if one exists
171171func findMethodWithGivenReceiver (object types.Object ) * types.Func {
172- meth := findMethodOnTypeWithGivenReceiver (object .Type (), object )
172+ unaliasedType := types .Unalias (object .Type ())
173+ meth := findMethodOnTypeWithGivenReceiver (unaliasedType , object )
173174 if meth != nil {
174175 return meth
175176 }
176- if pointerType , ok := object . Type () .(* types.Pointer ); ok {
177+ if pointerType , ok := unaliasedType .(* types.Pointer ); ok {
177178 meth = findMethodOnTypeWithGivenReceiver (pointerType .Elem (), object )
178179 }
179180 return meth
You can’t perform that action at this time.
0 commit comments