aboutsummaryrefslogtreecommitdiff
path: root/test/typeparam
diff options
context:
space:
mode:
authorIan Lance Taylor <iant@golang.org>2021-10-27 14:11:33 -0700
committerIan Lance Taylor <iant@golang.org>2021-10-27 22:17:35 +0000
commit79ff663754f4238bd1fe2e56f460c2f603c71b80 (patch)
tree2911e1c493c20b931e979e3369cae48bef478409 /test/typeparam
parent749f6e9eb6d101ef2ea4b7228a966391a80aa89b (diff)
downloadgo-79ff663754f4238bd1fe2e56f460c2f603c71b80.tar.xz
constraints: remove Slice/Map/Chan
Now that we permit arbitrary types as constraints, we no longer need them. For #48424 Change-Id: I15fef26a563988074650cb0801895b002c44148a Reviewed-on: https://go-review.googlesource.com/c/go/+/359258 Trust: Ian Lance Taylor <iant@golang.org> Run-TryBot: Ian Lance Taylor <iant@golang.org> Reviewed-by: Robert Griesemer <gri@golang.org>
Diffstat (limited to 'test/typeparam')
-rw-r--r--test/typeparam/issue48609.go4
1 files changed, 1 insertions, 3 deletions
diff --git a/test/typeparam/issue48609.go b/test/typeparam/issue48609.go
index 3ca9d6e7d6..6cf6908291 100644
--- a/test/typeparam/issue48609.go
+++ b/test/typeparam/issue48609.go
@@ -6,9 +6,7 @@
package p
-import "constraints"
-
-func f[T constraints.Chan[E], E any](e E) T {
+func f[T ~chan E, E any](e E) T {
ch := make(T)
go func() {
defer close(ch)