blob: bf4d875adedb08cc0dfa6f14406eab03cca573a8 [file] [log] [blame]
This test verifies that the embedded field has a method with the same name.
-- issue64114.go --
package stub
// Regression test for issue #64114: code action "implement" is not listed.
var _ WriteTest = (*WriteStruct)(nil) //@suggestedfix("(", re"does not implement", issue64114)
type WriterTwoStruct struct{}
// Write implements io.ReadWriter.
func (t *WriterTwoStruct) RRRR(str string) error {
panic("unimplemented")
}
type WriteTest interface {
RRRR()
WWWW()
}
type WriteStruct struct {
WriterTwoStruct
}
-- @issue64114/issue64114.go --
@@ -22 +22,11 @@
+
+// RRRR implements WriteTest.
+// Subtle: this method shadows the method (WriterTwoStruct).RRRR of WriteStruct.WriterTwoStruct.
+func (*WriteStruct) RRRR() {
+ panic("unimplemented")
+}
+
+// WWWW implements WriteTest.
+func (*WriteStruct) WWWW() {
+ panic("unimplemented")
+}