1
0
mirror of https://github.com/golang/go synced 2024-11-19 04:04:47 -07:00
go/internal/lsp/testdata/rename/testy/testy.go
Suzy Mueller 9065c182e3 internal/lsp: fix bug renaming local vars with test files present
This fix adds all packages to the renamer packages map.

Renaming performs checks on each package to make sure there are no
conflicts. If there are multiple packages, each package needs to be
checked. The packages were being incorrectly added to the map and were
all being put under a single key.

Fixes golang/go#33664

Change-Id: I68466ce34ac49b700ce6d14ce0b53e2795926fa9
Reviewed-on: https://go-review.googlesource.com/c/tools/+/190399
Reviewed-by: Rebecca Stambler <rstambler@golang.org>
2019-08-15 14:43:58 +00:00

8 lines
105 B
Go

package testy
type tt int //@rename("tt", "testyType")
func a() {
foo := 42 //@rename("foo", "bar")
}