Replies: 2 comments 2 replies
-
It isn't possible to define a method with the same name but with both a pointer and a non-pointer receiver: https://go.dev/play/p/U4O8V1rMx_k |
Beta Was this translation helpful? Give feedback.
1 reply
-
Ah, yes, it's because you are calling it through an interface. This is unfortunate, however I'm not sure there's anything we could do about this. |
Beta Was this translation helpful? Give feedback.
1 reply
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
The most annoying thing about dlv is this:
Okay, so I'll try make it clearer
At this point it's really not ambigious, is it? If I wanted the pointer version I would have specified
(*myType).MyFunction
, but whatever, I'll add part of the package name... really? Again, I would have specified
pkgpart.(*myType).MyFunction
if I wanted the pointer version, it is not ambigious.If my package looks like:
github.com/account/project/some/package/folders/file.go
I really don't want to have to type that in every single time I want for a locspec, especially since that pointer value is only even present because it's implementing an interface, there's not even project code.Furthermore, how does this fail due to being ambigious? Clearly the pointer version is specified.
In fact, unless I provide the complete path it always complains about being ambigious even when the rest of the path is the same for both options. Given the function with and without the pointer receiver is within the same file, the entire path is the same,
dlv 1.22.0
Beta Was this translation helpful? Give feedback.
All reactions