...
1
2
3
4
5
6
7 package p
8
9 import "unsafe"
10
11
12
13 type (
14 A interface { B }
15 B interface { C }
16 C interface { D; F() A }
17 D interface { G() B }
18 )
19
20 var _ = A(nil).G
21
22
23
24
25 type sourceBridge interface {
26 listVersions() ([]Version, error)
27 }
28
29 type Constraint interface {
30 copyTo(*ConstraintMsg)
31 }
32
33 type ConstraintMsg struct{}
34
35 func (m *ConstraintMsg) asUnpairedVersion() UnpairedVersion {
36 return nil
37 }
38
39 type Version interface {
40 Constraint
41 }
42
43 type UnpairedVersion interface {
44 Version
45 }
46
47 var _ Constraint = UnpairedVersion(nil)
48
49
50
51
52 type (
53 _ interface{ m(B1) }
54 A1 interface{ a(D1) }
55 B1 interface{ A1 }
56 C1 interface{ B1 }
57 D1 interface{ C1 }
58 )
59
60 var _ A1 = C1(nil)
61
62
63
64
65 func F(x I4) interface{} {
66 return x.Method()
67 }
68
69 type Unused interface {
70 RefersToI1(a I1)
71 }
72
73 type I1 interface {
74 I2
75 I3
76 }
77
78 type I2 interface {
79 RefersToI4() I4
80 }
81
82 type I3 interface {
83 Method() interface{}
84 }
85
86 type I4 interface {
87 I1
88 }
89
90
91
92
93 type Error interface{ error }
94
95 var err Error
96 var _ = err.Error()
97
98
99
100
101 type (
102 T1 interface { T2 }
103 T2 T2
104 )
105
106 type (
107 T3 interface { T4 }
108 T4 T5
109 T5 = T6
110 T6 = T7
111 T7 = T4
112 )
113
114
115
116
117 const n = unsafe.Sizeof(func(){})
118
119 type I interface {
120 m([unsafe.Sizeof(func() { I.m(nil, [n]byte{}) })]byte)
121 }
122
123
124
125
126 type T10 = *T10
127 type T11 = interface{ f(T11) }
128
129
130 type (
131 aa = bb
132 bb struct {
133 *aa
134 }
135 )
136
137 type (
138 a struct{ *b }
139 b = c
140 c struct{ *b }
141 )
142
143
144 type (
145 _ interface {
146 M(P)
147 }
148
149 M interface {
150 F() P
151 }
152
153 P = interface {
154 I() M
155 }
156 )
157
158
159 type T12 [len(a12)]int
160 var a12 = makeArray()
161 func makeArray() (res T12) { return }
162
163
164 var r = newReader()
165 func newReader() r
166
167
168 var arr = f()
169 func f() [len(arr)]int
170
171
172 func ff(ff )
173 func gg((gg ))
174
175 type T13 [len(b13)]int
176 var b13 T13
177
178 func g1() [unsafe.Sizeof(g1)]int
179 func g2() [unsafe.Sizeof(x2)]int
180 var x2 = g2
181
182
183
184 func init() {
185 assert(unsafe.Sizeof(g1) == 8)
186 assert(unsafe.Sizeof(x2) == 8)
187 }
188
189 func h() [h ()[0]]int { panic(0) }
190
191 var c14 T14
192 type T14 [uintptr(unsafe.Sizeof(&c14))]byte
193
194
195 type T15 struct {
196 f func() T16
197 b T16
198 }
199
200 type T16 struct {
201 T15
202 }
View as plain text