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)
169
169
170
170
// findMethodWithGivenReceiver finds a method with `object` as its receiver, if one exists
171
171
func findMethodWithGivenReceiver (object types.Object ) * types.Func {
172
- meth := findMethodOnTypeWithGivenReceiver (object .Type (), object )
172
+ unaliasedType := types .Unalias (object .Type ())
173
+ meth := findMethodOnTypeWithGivenReceiver (unaliasedType , object )
173
174
if meth != nil {
174
175
return meth
175
176
}
176
- if pointerType , ok := object . Type () .(* types.Pointer ); ok {
177
+ if pointerType , ok := unaliasedType .(* types.Pointer ); ok {
177
178
meth = findMethodOnTypeWithGivenReceiver (pointerType .Elem (), object )
178
179
}
179
180
return meth
You can’t perform that action at this time.
0 commit comments