]> Cypherpunks repositories - gostls13.git/commit
go/printer: don't print unnecesary commas for func type param lists
authorRobert Findley <rfindley@google.com>
Tue, 8 Mar 2022 21:43:47 +0000 (16:43 -0500)
committerRobert Findley <rfindley@google.com>
Tue, 8 Mar 2022 22:23:42 +0000 (22:23 +0000)
commit0add0647d80f8ec794042b4608275830372fe298
tree49b84fd03980226457e62d61e034f942b19173ec
parent4469557974a95b1f4bc1c700aee6779a0f15d22e
go/printer: don't print unnecesary commas for func type param lists

Type parameter lists are not ambiguous for function declarations in the
way that they are ambiguous for type declarations. Avoid printing an
extra comma to disambiguate.

Fixes #51548

Change-Id: I8ca2b21e271982013653b9e220f92ee74f577ba2
Reviewed-on: https://go-review.googlesource.com/c/go/+/390914
Trust: Robert Findley <rfindley@google.com>
Run-TryBot: Robert Findley <rfindley@google.com>
Reviewed-by: Robert Griesemer <gri@golang.org>
TryBot-Result: Gopher Robot <gobot@golang.org>
src/go/printer/nodes.go
src/go/printer/testdata/generics.golden
src/go/printer/testdata/generics.input