Skip to content

Commit 07c2097

Browse files
committed
Fix test
1 parent ea9adc8 commit 07c2097

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

test/testdata/exportloopref.go

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -10,11 +10,11 @@ func dummyFunction() {
1010
println("loop expecting 10, 11, 12, 13")
1111
for i, p := range []int{10, 11, 12, 13} {
1212
printp(&p)
13-
slice = append(slice, &p) // ERROR : exporting a pointer for the loop variable p
14-
array[i] = &p // ERROR : exporting a pointer for the loop variable p
13+
slice = append(slice, &p) // ERROR : "exporting a pointer for the loop variable p"
14+
array[i] = &p // ERROR : "exporting a pointer for the loop variable p"
1515
if i%2 == 0 {
16-
ref = &p // ERROR : exporting a pointer for the loop variable p
17-
str.x = &p // ERROR : exporting a pointer for the loop variable p
16+
ref = &p // ERROR : "exporting a pointer for the loop variable p"
17+
str.x = &p // ERROR : "exporting a pointer for the loop variable p"
1818
}
1919
var vStr struct{ x *int }
2020
var vArray [4]*int

0 commit comments

Comments
 (0)