]> Cypherpunks repositories - gostls13.git/commit
gofmt: avoid endless loops
authorRobert Griesemer <gri@golang.org>
Wed, 13 Apr 2011 16:38:13 +0000 (09:38 -0700)
committerRobert Griesemer <gri@golang.org>
Wed, 13 Apr 2011 16:38:13 +0000 (09:38 -0700)
commita5ca63528793a8e0f248d9a95a07845328c3d800
tree0e179f14c8375350fd090fe162dcfaa4d14d67d4
parent7c270aef08fa22935265540614532258d58fccb4
gofmt: avoid endless loops

With the (partial) resolution of identifiers done
by the go/parser, ast.Objects point may introduce
cycles in the AST. Don't follow *ast.Objects, and
replace them with nil instead (they are likely
incorrect after a rewrite anyway).

- minor manual cleanups after reflect change automatic rewrite
- includes fix by rsc related to reflect change

Fixes #1667.

R=rsc
CC=golang-dev
https://golang.org/cl/4387044
src/cmd/gofmt/rewrite.go