Debian Codegraph @

gopls/internal/test/marker/testdata/rename/unexported.txt

raw
1
2 This test attempts to rename a.S.X to x, which would make it
3 inaccessible from its external test package. The rename tool
4 should report an error rather than wrecking the program.
5 See issue #59403.
6
7 -- go.mod --
8 module example.com
9 go 1.12
10
11 -- a/a.go --
12 package a
13
14 var S struct{ X int } //@renameerr("X", "x", oops)
15
16 -- a/a_test.go --
17 package a_test
18
19 import "example.com/a"
20
21 var Y = a.S.X
22
23 -- @oops --
24 a/a.go:3:15: renaming "X" to "x" would make it unexported
25 a/a_test.go:5:13: breaking references from packages such as "example.com/a_test"