You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
package main
func main() {
A := F{}
C := F{}
C.Copy(&A)
}
type F struct{ b map[int]int }
func (f *F) Copy(f2 *F) { f.b = f2.b }
go vet warns: foo.go:6: possibly passing Go type with embedded pointer to C. Additionally, it prints the message twice.
Renaming C to B gets rid of the false positive.
The text was updated successfully, but these errors were encountered:
ericlagergren
changed the title
cmt/vet: false positive about passing Go pointer to C
cmd/vet: false positive about passing Go pointer to C
Feb 2, 2018
1.9.2, linux/amd64
go vet
warns:foo.go:6: possibly passing Go type with embedded pointer to C
. Additionally, it prints the message twice.Renaming
C
toB
gets rid of the false positive.The text was updated successfully, but these errors were encountered: