]> Cypherpunks repositories - gostls13.git/commit
cmd/gofmt: clear pattern match map at the correct time
authorMatthew Dempsky <mdempsky@google.com>
Tue, 7 Feb 2017 23:29:18 +0000 (15:29 -0800)
committerMatthew Dempsky <mdempsky@google.com>
Wed, 8 Feb 2017 04:48:20 +0000 (04:48 +0000)
commite410d2a81ef26d7dcef0c712b584d2345b15148e
tree1c334676022664d04143c8bcb813e10a9902ef3d
parent87ad863f359de3760578acb7f7a4d7e333c9cdc8
cmd/gofmt: clear pattern match map at the correct time

We need to clear the pattern match map after the recursive rewrite
applications, otherwise there might be lingering entries that cause
match to fail.

Fixes #18987.

Change-Id: I7913951c455c98932bda790861db6a860ebad032
Reviewed-on: https://go-review.googlesource.com/36546
Run-TryBot: Matthew Dempsky <mdempsky@google.com>
Reviewed-by: Robert Griesemer <gri@golang.org>
TryBot-Result: Gobot Gobot <gobot@golang.org>
src/cmd/gofmt/rewrite.go
src/cmd/gofmt/testdata/rewrite9.golden [new file with mode: 0644]
src/cmd/gofmt/testdata/rewrite9.input [new file with mode: 0644]