cmd/compile: recommend fix when "method has pointer receiver" #44201
Labels
compiler/runtime
Issues related to the Go compiler and/or runtime.
NeedsDecision
Feedback is required from experts, contributors, and/or the community before a change can be made.
Milestone
Go's diagnostic message when passing a non-pointer to a function taking an interface is confusing because it doesn't explain very well what the problem is.
Example (https://play.golang.org/p/MXm6RG5fYPy):
This produces the diagnostic:
... which is only half the story, and makes it difficult to see what's actually wrong. A better diagnostic would be:
The text was updated successfully, but these errors were encountered: