...
1
2
3
4
5 package p
6
7 func _[T comparable](x T) {
8 _ = x == x
9 }
10
11 func _[T interface{interface{comparable}}](x T) {
12 _ = x == x
13 }
14
15 func _[T interface{comparable; interface{comparable}}](x T) {
16 _ = x == x
17 }
18
19 func _[T interface{comparable; ~int}](x T) {
20 _ = x == x
21 }
22
23 func _[T interface{comparable; ~[]byte}](x T) {
24 _ = x == x
25 }
26
27
28 func _[T interface{comparable; ~int; ~string}](x T) {
29 _ = x == x
30 }
31
32
33 func _[T interface{~int; ~string}](x T) {
34 _ = x == x
35 }
36
37 func _[T interface{comparable; interface{~int}; interface{int|float64}}](x T) {
38 _ = x == x
39 }
40
41 func _[T interface{interface{comparable; ~int}; interface{~float64; comparable; m()}}](x T) {
42 _ = x == x
43 }
44
45
46
47 func f[T interface{comparable; []byte|string}](x T) {
48 _ = x == x
49 }
50
51 func _(s []byte) {
52 f (s)
53 _ = f[[ ]byte]
54 }
55
View as plain text