aboutsummaryrefslogtreecommitdiff
path: root/src/cmd/gofmt
diff options
context:
space:
mode:
authorRobert Findley <rfindley@google.com>2021-10-27 11:14:24 -0400
committerRobert Findley <rfindley@google.com>2021-10-28 15:34:22 +0000
commit925ea2dfc4911188d47cca5c5534916e39dc1463 (patch)
tree444093f42ed4eb8553e14482aef2e08b1c74086e /src/cmd/gofmt
parenta5a423e0e809e451b06771eb6a7b95cc9255f9fd (diff)
downloadgo-925ea2dfc4911188d47cca5c5534916e39dc1463.tar.gz
go-925ea2dfc4911188d47cca5c5534916e39dc1463.zip
go/types, types2, go/ast, go/parser: remove support for type lists
This is a rough port of CL 354131 to go/* libraries, though in practice I just tried to reconcile any places where the phrase "type list" occurred in the source. This resulted in adjusting quite a bit more code than initially expected, including a few lingering cases in the compiler. Change-Id: Ie62a9e1aeb831b73931bc4c78bbb6ccb24f53fb0 Reviewed-on: https://go-review.googlesource.com/c/go/+/359135 Trust: Robert Findley <rfindley@google.com> Run-TryBot: Robert Findley <rfindley@google.com> TryBot-Result: Go Bot <gobot@golang.org> Reviewed-by: Robert Griesemer <gri@golang.org>
Diffstat (limited to 'src/cmd/gofmt')
-rw-r--r--src/cmd/gofmt/testdata/typeparams.golden2
-rw-r--r--src/cmd/gofmt/testdata/typeparams.input2
2 files changed, 2 insertions, 2 deletions
diff --git a/src/cmd/gofmt/testdata/typeparams.golden b/src/cmd/gofmt/testdata/typeparams.golden
index f71bd130db..d57a2ba59b 100644
--- a/src/cmd/gofmt/testdata/typeparams.golden
+++ b/src/cmd/gofmt/testdata/typeparams.golden
@@ -21,7 +21,7 @@ func f[P1, P2, P3 any](x1 P1, x2 P2, x3 P3) struct{}
func f[P interface{}](x P)
func f[P1, P2, P3 interface {
m1(P1)
- type P2, P3
+ ~P2 | ~P3
}](x1 P1, x2 P2, x3 P3) struct{}
func f[P any](T1[P], T2[P]) T3[P]
diff --git a/src/cmd/gofmt/testdata/typeparams.input b/src/cmd/gofmt/testdata/typeparams.input
index 5d4c53d9f7..775cf9eb7b 100644
--- a/src/cmd/gofmt/testdata/typeparams.input
+++ b/src/cmd/gofmt/testdata/typeparams.input
@@ -19,7 +19,7 @@ func f[P any](x P)
func f[P1, P2, P3 any](x1 P1, x2 P2, x3 P3) struct{}
func f[P interface{}](x P)
-func f[P1, P2, P3 interface{ m1(P1); type P2, P3 }](x1 P1, x2 P2, x3 P3) struct{}
+func f[P1, P2, P3 interface{ m1(P1); ~P2|~P3 }](x1 P1, x2 P2, x3 P3) struct{}
func f[P any](T1[P], T2[P]) T3[P]
func (x T[P]) m()