golang.org/x/tools/gopls@v0.15.3/internal/test/marker/testdata/rename/issue43616.txt (about) 1 This test verifies the fix for golang/go#43616: renaming mishandles embedded 2 fields. 3 4 -- p.go -- 5 package issue43616 6 7 type foo int //@rename("foo", "bar", fooToBar),preparerename("oo","foo","foo") 8 9 var x struct{ foo } //@renameerr("foo", "baz", "rename the type directly") 10 11 var _ = x.foo //@renameerr("foo", "quux", "rename the type directly") 12 -- @fooToBar/p.go -- 13 @@ -3 +3 @@ 14 -type foo int //@rename("foo", "bar", fooToBar),preparerename("oo","foo","foo") 15 +type bar int //@rename("foo", "bar", fooToBar),preparerename("oo","foo","foo") 16 @@ -5 +5 @@ 17 -var x struct{ foo } //@renameerr("foo", "baz", "rename the type directly") 18 +var x struct{ bar } //@renameerr("foo", "baz", "rename the type directly") 19 @@ -7 +7 @@ 20 -var _ = x.foo //@renameerr("foo", "quux", "rename the type directly") 21 +var _ = x.bar //@renameerr("foo", "quux", "rename the type directly")