go/printer: parenthesize literal function types in conversions

Also: gofmt -w src misc

R=r
CC=golang-dev, iant
https://golang.org/cl/6591071
This commit is contained in:
Robert Griesemer 2012-10-04 21:03:50 -07:00
parent 6c740e769f
commit 1065c6f65a
5 changed files with 54 additions and 2 deletions

View file

@ -1494,7 +1494,7 @@ func TestMethod(t *testing.T) {
}
// Curried method of value.
tfunc := TypeOf(func(int) int(nil))
tfunc := TypeOf((func(int) int)(nil))
v := ValueOf(p).Method(1)
if tt := v.Type(); tt != tfunc {
t.Errorf("Value Method Type is %s; want %s", tt, tfunc)