]> Cypherpunks repositories - gostls13.git/commit
cmd/vet: diagnose plain assignment in copylock detector
authorRuss Cox <rsc@golang.org>
Sun, 16 Aug 2015 00:50:17 +0000 (20:50 -0400)
committerRob Pike <r@golang.org>
Thu, 10 Sep 2015 16:55:51 +0000 (16:55 +0000)
commitd8384e9a8f35efff15c8f62187dc793f79b7a355
treea532c6befae8ce4c669dc1fe14616b859fc17dd3
parent81a4bbffbf70edd3aaa401b38eb581ad94e2288f
cmd/vet: diagnose plain assignment in copylock detector

It went out of its way to look for implicit assignments
but never checked explicit assignments.

This detects the root bug for #12099.

Change-Id: I6a6e774cc38749ea8be7cfd58ba6421247b67000
Reviewed-on: https://go-review.googlesource.com/13646
Reviewed-by: Josh Bleecher Snyder <josharian@gmail.com>
Reviewed-by: Rob Pike <r@golang.org>
src/cmd/vet/copylock.go
src/cmd/vet/testdata/copylock.go [new file with mode: 0644]
src/cmd/vet/testdata/copylock_func.go
src/cmd/vet/testdata/copylock_range.go