the compiler as before reports errors about the _ methods being invalid but otherwise is quiet. Yet, the following version
reports the error duplicate method _ because now the two _ methods have different signatures. While this is consistent with what we'd expect from any other method, it seems confusing.
For contrast, go/types never adds the _ methods which results in fewer errors.
See also $GOROOT/test/interface/explicit.go (at end) where there's an explicit test that nothing implements an interface with a _ method. Since it's not possible to declare such interfaces in the first place, it may be simpler to just ignore _ methods when encountering them in interface declarations, and then this last test would pass w/o error, and the above examples would only produce errors when the _ methods are declared.
I'd like to see compelling evidence for keeping the existing behavior.
If an interface contains a blank method, that's already an error. No
need for useless follow-up error messages about not implementing them.
Trust: Matthew Dempsky <email@example.com>
Run-TryBot: Matthew Dempsky <firstname.lastname@example.org>
TryBot-Result: Go Bot <email@example.com>
Reviewed-by: Robert Griesemer <firstname.lastname@example.org>