diff options
Diffstat (limited to 'src/cmd/gofmt/simplify.go')
-rw-r--r-- | src/cmd/gofmt/simplify.go | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/src/cmd/gofmt/simplify.go b/src/cmd/gofmt/simplify.go index bcc67c4a6..40a9f8f17 100644 --- a/src/cmd/gofmt/simplify.go +++ b/src/cmd/gofmt/simplify.go @@ -26,7 +26,7 @@ func (s *simplifier) Visit(node ast.Node) ast.Visitor { } if eltType != nil { - typ := reflect.NewValue(eltType) + typ := reflect.ValueOf(eltType) for _, x := range outer.Elts { // look at value of indexed/named elements if t, ok := x.(*ast.KeyValueExpr); ok { @@ -37,7 +37,7 @@ func (s *simplifier) Visit(node ast.Node) ast.Visitor { // matches the outer literal's element type exactly, the inner // literal type may be omitted if inner, ok := x.(*ast.CompositeLit); ok { - if match(nil, typ, reflect.NewValue(inner.Type)) { + if match(nil, typ, reflect.ValueOf(inner.Type)) { inner.Type = nil } } |