1
2
3
4
5
6
7
8
9 package smoketest
10
11
12 func f1[P any]() {}
13 func f2[P1, P2 any, P3 any]() {}
14 func f3[P interface{}](x P, y T1[int]) {}
15
16
17 var _ = f1[int]
18 var _ = f2[int, string, struct{}]
19 var _ = f3[bool]
20
21
22 type T1[P any] struct{}
23 type T2[P1, P2 any, P3 any] struct{}
24 type T3[P interface{}] interface{}
25
26
27 type _ T1[int]
28 type _ T2[int, string, struct{}]
29 type _ T3[bool]
30
31
32 func (T1[P]) m1() {}
33 func (T1[_]) m2() {}
34 func (x T2[P1, P2, P3]) m() {}
35
36
37 type _ interface {
38 m1()
39 m2()
40 int | float32 | string
41 m3()
42 }
43
44
45 type _ struct {
46 f1, f2 int
47 T1[int]
48 T2[int, string, struct{}]
49 T3[bool]
50 }
51
52 type _ interface {
53 m1()
54 m2()
55 T3[bool]
56 }
57
View as plain text