golang.org/x/tools/gopls@v0.15.3/internal/test/marker/testdata/stubmethods/issue64114.txt (about) 1 This test verifies that the embedded field has a method with the same name. 2 3 -- issue64114.go -- 4 package stub 5 6 // Regression test for issue #64114: code action "implement" is not listed. 7 8 var _ WriteTest = (*WriteStruct)(nil) //@suggestedfix("(", re"does not implement", issue64114) 9 10 type WriterTwoStruct struct{} 11 12 // Write implements io.ReadWriter. 13 func (t *WriterTwoStruct) RRRR(str string) error { 14 panic("unimplemented") 15 } 16 17 type WriteTest interface { 18 RRRR() 19 WWWW() 20 } 21 22 type WriteStruct struct { 23 WriterTwoStruct 24 } 25 -- @issue64114/issue64114.go -- 26 @@ -22 +22,11 @@ 27 + 28 +// RRRR implements WriteTest. 29 +// Subtle: this method shadows the method (WriterTwoStruct).RRRR of WriteStruct.WriterTwoStruct. 30 +func (w *WriteStruct) RRRR() { 31 + panic("unimplemented") 32 +} 33 + 34 +// WWWW implements WriteTest. 35 +func (w *WriteStruct) WWWW() { 36 + panic("unimplemented") 37 +}