diff options
Diffstat (limited to 'src/pkg/go/printer/nodes.go')
-rw-r--r-- | src/pkg/go/printer/nodes.go | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/src/pkg/go/printer/nodes.go b/src/pkg/go/printer/nodes.go index ee0bbf1ed..7cd068e22 100644 --- a/src/pkg/go/printer/nodes.go +++ b/src/pkg/go/printer/nodes.go @@ -271,12 +271,12 @@ func (p *printer) parameters(fields *ast.FieldList) { // if there are multiple parameter names for this par // or the type is on a separate line) var parLineBeg int - var parLineEnd = p.lineFor(par.Type.Pos()) if len(par.Names) > 0 { parLineBeg = p.lineFor(par.Names[0].Pos()) } else { - parLineBeg = parLineEnd + parLineBeg = p.lineFor(par.Type.Pos()) } + var parLineEnd = p.lineFor(par.Type.End()) // separating "," if needed needsLinebreak := 0 < prevLine && prevLine < parLineBeg if i > 0 { |