]> Cypherpunks repositories - gostls13.git/commit
vet: fix rangeloop.
authorDavid Symonds <dsymonds@golang.org>
Wed, 19 Sep 2012 22:12:47 +0000 (08:12 +1000)
committerDavid Symonds <dsymonds@golang.org>
Wed, 19 Sep 2012 22:12:47 +0000 (08:12 +1000)
commit5a93fea08e7c9cbc4ed5ab7ba161b3e078497fb3
treed65954412edec7895a163e81dfb85912b4f4b0b5
parentadcf0a2aa06ec1424b4d51d2b7ce043a60d29361
vet: fix rangeloop.

In a range loop, the presence of a value implies the presence of a key.
However, the presence of a value as an *ast.Ident does not imply that
the key is also an *ast.Ident, thus leading to a panic any time the
two argument form is used where the key is not an identifier.

R=golang-dev, adg, r
CC=golang-dev
https://golang.org/cl/6540045
src/cmd/vet/rangeloop.go