]> Cypherpunks repositories - gostls13.git/commit
gofmt: leave nil nodes of the AST unchanged.
authorRémy Oudompheng <oudomphe@phare.normalesup.org>
Fri, 11 Nov 2011 22:11:30 +0000 (14:11 -0800)
committerRobert Griesemer <gri@golang.org>
Fri, 11 Nov 2011 22:11:30 +0000 (14:11 -0800)
commit2ba079868204837891e531eecb4215eecfee8ff7
tree834fc862a96b8d5c7bb2f681fa9cbe7269e7ffb5
parent5fc3771b3a052ad8b724d6c5f6d491aa5a4b88b3
gofmt: leave nil nodes of the AST unchanged.

Without this check, gofmt panics when trying to apply
the identity transformation on "item.field" expressions.
Fixes #2410.

R=rsc, gri
CC=golang-dev, remy
https://golang.org/cl/5376061
src/cmd/gofmt/gofmt_test.go
src/cmd/gofmt/rewrite.go
src/cmd/gofmt/testdata/rewrite3.golden [new file with mode: 0644]
src/cmd/gofmt/testdata/rewrite3.input [new file with mode: 0644]