aboutsummaryrefslogtreecommitdiff
path: root/src/go/types/testdata/examples/inference.go2
diff options
context:
space:
mode:
Diffstat (limited to 'src/go/types/testdata/examples/inference.go2')
-rw-r--r--src/go/types/testdata/examples/inference.go26
1 files changed, 3 insertions, 3 deletions
diff --git a/src/go/types/testdata/examples/inference.go2 b/src/go/types/testdata/examples/inference.go2
index b4f3369aa0..1142e569b4 100644
--- a/src/go/types/testdata/examples/inference.go2
+++ b/src/go/types/testdata/examples/inference.go2
@@ -7,7 +7,7 @@
package p
type Ordered interface {
- type int, float64, string
+ ~int|~float64|~string
}
func min[T Ordered](x, y T) T
@@ -54,7 +54,7 @@ func _() {
mixed[int, string](1.1 /* ERROR cannot use 1.1 */ , "", false)
}
-func related1[Slice interface{type []Elem}, Elem any](s Slice, e Elem)
+func related1[Slice interface{~[]Elem}, Elem any](s Slice, e Elem)
func _() {
// related1 can be called with explicit instantiation.
@@ -78,7 +78,7 @@ func _() {
related1(si, "foo" /* ERROR cannot use "foo" */ )
}
-func related2[Elem any, Slice interface{type []Elem}](e Elem, s Slice)
+func related2[Elem any, Slice interface{~[]Elem}](e Elem, s Slice)
func _() {
// related2 can be called with explicit instantiation.