]> Cypherpunks repositories - gostls13.git/commit
go/printer, gofmt: avoid extra final comma in multi-line signatures
authorRobert Griesemer <gri@golang.org>
Tue, 12 Mar 2013 20:07:15 +0000 (13:07 -0700)
committerRobert Griesemer <gri@golang.org>
Tue, 12 Mar 2013 20:07:15 +0000 (13:07 -0700)
commit8323cef77cb4bc9c905aca7cd8b66655c8e3b3a2
treedc327dc1eba1777aa7c57acc8ae40dff7cff5a07
parentd825320550b87158286ec772baddab81d07079e0
go/printer, gofmt: avoid extra final comma in multi-line signatures

The parameter list layout function was incorrectly computing the
end of the previous line in cases where a parameter type spanned
multiple lines. As a result, an extra (valid, but not needed)
comma was introduced before the paremeter list's closing parenthesis.

Fixes #4533.

R=rsc
CC=golang-dev
https://golang.org/cl/7674044
src/pkg/go/printer/nodes.go
src/pkg/go/printer/testdata/declarations.golden
src/pkg/go/printer/testdata/declarations.input