diff options
Diffstat (limited to 'src/pkg/go/printer/nodes.go')
-rw-r--r-- | src/pkg/go/printer/nodes.go | 12 |
1 files changed, 3 insertions, 9 deletions
diff --git a/src/pkg/go/printer/nodes.go b/src/pkg/go/printer/nodes.go index dd6b1db6b..6096751bd 100644 --- a/src/pkg/go/printer/nodes.go +++ b/src/pkg/go/printer/nodes.go @@ -241,19 +241,13 @@ func (p *printer) signature(params, result []*ast.Field, multiLine *bool) { p.parameters(params, multiLine) if result != nil { p.print(blank) - if len(result) == 1 && result[0].Names == nil { - // single anonymous result; no ()'s unless it's a function type - f := result[0] - if _, isFtyp := f.Type.(*ast.FuncType); !isFtyp { - p.expr(f.Type, multiLine) - return - } + // single anonymous result; no ()'s + p.expr(result[0].Type, multiLine) + return } - p.parameters(result, multiLine) } - return } |