1
2
3
4
5
6
7
8
9 package tparam1
10
11
12 var _ any
13
14 func _(_ any)
15
16 type _[_ any] struct{}
17
18 const N = 10
19
20 type (
21 _ []struct{}
22 _ [N]struct{}
23 _[T any] struct{}
24 _[T, T any] struct{}
25 _[T1, T2 any, T3 any] struct{}
26 )
27
28 func _[T any]() {}
29 func _[T, T any]() {}
30 func _[T1, T2 any](x T1) T2 { panic(0) }
31
32
33 type C interface{}
34
35 func _[T interface{}]() {}
36 func _[T C]() {}
37 func _[T struct{}]() {}
38 func _[T interface{ m() T }]() {}
39 func _[T1 interface{ m() T2 }, T2 interface{ m() T1 }]() {
40 var _ T1
41 }
42
43
44
View as plain text