We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 9b0854e commit 228c45aCopy full SHA for 228c45a
1 file changed
go/extractor/trap/labels.go
@@ -169,11 +169,12 @@ func (l *Labeler) ScopedObjectID(object types.Object, getTypeLabel func() Label)
169
170
// findMethodWithGivenReceiver finds a method with `object` as its receiver, if one exists
171
func findMethodWithGivenReceiver(object types.Object) *types.Func {
172
- meth := findMethodOnTypeWithGivenReceiver(object.Type(), object)
+ unaliasedType := types.Unalias(object.Type())
173
+ meth := findMethodOnTypeWithGivenReceiver(unaliasedType, object)
174
if meth != nil {
175
return meth
176
}
- if pointerType, ok := object.Type().(*types.Pointer); ok {
177
+ if pointerType, ok := unaliasedType.(*types.Pointer); ok {
178
meth = findMethodOnTypeWithGivenReceiver(pointerType.Elem(), object)
179
180
0 commit comments