...
1
2
3
4
5 package p
6
7 type S[T any] struct{}
8
9 func (S[T]) m(T) {}
10
11 func f0[T any](chan S[T]) {}
12
13 func _() {
14 var x chan interface{ m(int) }
15 f0(x )
16 }
17
18
19
20 func f1[T any]([]S[T]) {}
21
22 func _() {
23 var x []interface{ m(int) }
24 f1(x )
25 }
26
27 type I[T any] interface {
28 m(T)
29 }
30
31 func f2[T any](func(I[T])) {}
32
33 func _() {
34 var x func(interface{ m(int) })
35 f2(x )
36 }
37
38 func f3[T any](func(I[T])) {}
39
40 func _() {
41 var x func(I[int])
42 f3(x)
43 }
44
45 func f4[T any]([10]I[T]) {}
46
47 func _() {
48 var x [10]interface{ I[int] }
49 f4(x )
50 }
51
52 func f5[T any](I[T]) {}
53
54 func _() {
55 var x interface {
56 m(int)
57 n()
58 }
59 f5(x)
60 f5[int](x)
61 }
62
View as plain text