mirror of
https://github.com/golang/go.git
synced 2025-12-08 06:10:04 +00:00
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:
parent
6c740e769f
commit
1065c6f65a
5 changed files with 54 additions and 2 deletions
|
|
@ -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)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue