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:
parent
439d863e7c
commit
c40314821b
@ -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 &
|
||||
}
|
||||
}
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user