1
0
mirror of https://github.com/golang/go synced 2024-11-21 22:14:41 -07:00

cmd/gofmt: fix simplify.go by running gofmt on cmd/gofmt

R=golang-dev
CC=golang-dev
https://golang.org/cl/5539061
This commit is contained in:
Olivier Duperray 2012-01-13 18:05:47 -08:00 committed by Robert Griesemer
parent 439d863e7c
commit c40314821b

View File

@ -50,8 +50,8 @@ func (s *simplifier) Visit(node ast.Node) ast.Visitor {
if addr, ok := x.(*ast.UnaryExpr); ok && addr.Op == token.AND {
if inner, ok := addr.X.(*ast.CompositeLit); ok {
if match(nil, reflect.ValueOf(ptr.X), reflect.ValueOf(inner.Type)) {
inner.Type = nil // drop T
*px = inner // drop &
inner.Type = nil // drop T
*px = inner // drop &
}
}
}