1
2
3
4
5
6
7 package p
8
9
10 type B[P any] struct{}
11 type _[P interface{}] struct{}
12 type _[P B] struct{}
13 type _[P B[P]] struct{}
14
15 type _[A, B, C any] struct{}
16 type _[A, B, C B] struct{}
17 type _[A, B, C B[A, B, C]] struct{}
18 type _[A1, A2 B1, A3 B2, A4, A5, A6 B3] struct{}
19
20 type _[A interface{}] struct{}
21 type _[A, B interface{ m() }] struct{}
22
23 type _[A, B, C any] struct{}
24
25
26 func _[P any]()
27 func _[P interface{}]()
28 func _[P B]()
29 func _[P B[P]]()
30
31
32 type _ T[int]
33
34
35 var _ = T[int]{}
36
37
38 type _ struct{ T[int] }
39
40
41 type _ interface {
42 m()
43 ~int
44 }
45
46 type _ interface {
47 ~int | ~float | ~string
48 ~complex128
49 underlying(underlying underlying) underlying
50 }
51
52 type _ interface {
53 T
54 T[int]
55 }
56
57
58 func _(T[P], T[P1, P2])
59 func _(a [N]T)
60
61 type _ struct {
62 T[P]
63 T[P1, P2]
64 f[N]
65 }
66 type _ interface {
67 m()
68
69
70 T[ ]
71 T[P]
72 T[P1, P2]
73 }
74
View as plain text