1
0
mirror of https://github.com/golang/go synced 2024-09-24 15:30:13 -06:00

cmd/link: fix loop variable capturing in TestDeadcode

Fixes #38884.

Change-Id: Id5ab9977b6404d0dbf71f13e3e4fefb6868ac802
Reviewed-on: https://go-review.googlesource.com/c/go/+/232377
Run-TryBot: Cherry Zhang <cherryyz@google.com>
Reviewed-by: Bryan C. Mills <bcmills@google.com>
TryBot-Result: Gobot Gobot <gobot@golang.org>
This commit is contained in:
Cherry Zhang 2020-05-05 16:20:56 -04:00
parent 0e617d3d5c
commit 430cee7cd2

View File

@ -32,6 +32,7 @@ func TestDeadcode(t *testing.T) {
{"typedesc", "type.main.T"},
}
for _, test := range tests {
test := test
t.Run(test.src, func(t *testing.T) {
t.Parallel()
src := filepath.Join("testdata", "deadcode", test.src+".go")