golang.org/x/tools/gopls@v0.15.3/internal/test/marker/testdata/rename/embed.txt (about) 1 This test exercises renaming of types used as embedded fields. 2 3 -- go.mod -- 4 module example.com 5 go 1.12 6 7 -- a/a.go -- 8 package a 9 10 type A int //@rename("A", "A2", type) 11 12 -- b/b.go -- 13 package b 14 15 import "example.com/a" 16 17 type B struct { a.A } //@renameerr("A", "A3", errAnonField) 18 19 var _ = new(B).A //@renameerr("A", "A4", errAnonField) 20 21 -- @errAnonField -- 22 can't rename embedded fields: rename the type directly or name the field 23 -- @type/a/a.go -- 24 @@ -3 +3 @@ 25 -type A int //@rename("A", "A2", type) 26 +type A2 int //@rename("A", "A2", type) 27 -- @type/b/b.go -- 28 @@ -5 +5 @@ 29 -type B struct { a.A } //@renameerr("A", "A3", errAnonField) 30 +type B struct { a.A2 } //@renameerr("A", "A3", errAnonField) 31 @@ -7 +7 @@ 32 -var _ = new(B).A //@renameerr("A", "A4", errAnonField) 33 +var _ = new(B).A2 //@renameerr("A", "A4", errAnonField)