]> Cypherpunks repositories - gostls13.git/commit
[release-branch.go1.18] go/printer: don't print unnecesary commas for func type param...
authorRobert Findley <rfindley@google.com>
Tue, 8 Mar 2022 21:43:47 +0000 (16:43 -0500)
committerDmitri Shuralyov <dmitshur@golang.org>
Wed, 9 Mar 2022 16:46:32 +0000 (16:46 +0000)
commitd10b8192c0eeabb574b7f198917a656b6fa51c38
treef15235b8a61bc86c30c3ebbcf9ff9005d1f1448c
parentbf366ef711ca735b3dd52ba63d2106a27c55aef7
[release-branch.go1.18] 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>
(cherry picked from commit 0add0647d80f8ec794042b4608275830372fe298)
Reviewed-on: https://go-review.googlesource.com/c/go/+/390957
Trust: Dmitri Shuralyov <dmitshur@golang.org>
Run-TryBot: Dmitri Shuralyov <dmitshur@golang.org>
Reviewed-by: Robert Findley <rfindley@google.com>
src/go/printer/nodes.go
src/go/printer/testdata/generics.golden
src/go/printer/testdata/generics.input