...
1
2
3
4
5
6
7
8 package conversions2
9
10 type I interface {
11 m()
12 }
13
14
15
16 func _() {
17 type S struct{}
18 type T struct{}
19 var s S
20 var t T
21 var u struct{}
22 s = s
23 s = t
24 s = u
25 s = S(s)
26 s = S(t)
27 s = S(u)
28 t = u
29 t = T(u)
30 }
31
32 func _() {
33 type S struct{ x int }
34 type T struct {
35 x int "foo"
36 }
37 var s S
38 var t T
39 var u struct {
40 x int "bar"
41 }
42 s = s
43 s = t
44 s = u
45 s = S(s)
46 s = S(t)
47 s = S(u)
48 t = u
49 t = T(u)
50 }
51
52 func _() {
53 type E struct{ x int }
54 type S struct{ x E }
55 type T struct {
56 x E "foo"
57 }
58 var s S
59 var t T
60 var u struct {
61 x E "bar"
62 }
63 s = s
64 s = t
65 s = u
66 s = S(s)
67 s = S(t)
68 s = S(u)
69 t = u
70 t = T(u)
71 }
72
73 func _() {
74 type S struct {
75 x struct {
76 x int "foo"
77 }
78 }
79 type T struct {
80 x struct {
81 x int "bar"
82 } "foo"
83 }
84 var s S
85 var t T
86 var u struct {
87 x struct {
88 x int "bar"
89 } "bar"
90 }
91 s = s
92 s = t
93 s = u
94 s = S(s)
95 s = S(t)
96 s = S(u)
97 t = u
98 t = T(u)
99 }
100
101 func _() {
102 type E1 struct {
103 x int "foo"
104 }
105 type E2 struct {
106 x int "bar"
107 }
108 type S struct{ x E1 }
109 type T struct {
110 x E2 "foo"
111 }
112 var s S
113 var t T
114 var u struct {
115 x E2 "bar"
116 }
117 s = s
118 s = t
119 s = u
120 s = S(s)
121 s = S(t )
122 s = S(u )
123 t = u
124 t = T(u)
125 }
126
127 func _() {
128 type E struct{ x int }
129 type S struct {
130 f func(struct {
131 x int "foo"
132 })
133 }
134 type T struct {
135 f func(struct {
136 x int "bar"
137 })
138 }
139 var s S
140 var t T
141 var u struct{ f func(E) }
142 s = s
143 s = t
144 s = u
145 s = S(s)
146 s = S(t)
147 s = S(u )
148 t = u
149 t = T(u )
150 }
151
152
153
154 func _() {
155 type S struct{}
156 type T struct{}
157 var s *S
158 var t *T
159 var u *struct{}
160 s = s
161 s = t
162 s = u
163 s = (*S)(s)
164 s = (*S)(t)
165 s = (*S)(u)
166 t = u
167 t = (*T)(u)
168 }
169
170 func _() {
171 type S struct{ x int }
172 type T struct {
173 x int "foo"
174 }
175 var s *S
176 var t *T
177 var u *struct {
178 x int "bar"
179 }
180 s = s
181 s = t
182 s = u
183 s = (*S)(s)
184 s = (*S)(t)
185 s = (*S)(u)
186 t = u
187 t = (*T)(u)
188 }
189
190 func _() {
191 type E struct{ x int }
192 type S struct{ x E }
193 type T struct {
194 x E "foo"
195 }
196 var s *S
197 var t *T
198 var u *struct {
199 x E "bar"
200 }
201 s = s
202 s = t
203 s = u
204 s = (*S)(s)
205 s = (*S)(t)
206 s = (*S)(u)
207 t = u
208 t = (*T)(u)
209 }
210
211 func _() {
212 type S struct {
213 x struct {
214 x int "foo"
215 }
216 }
217 type T struct {
218 x struct {
219 x int "bar"
220 } "foo"
221 }
222 var s *S
223 var t *T
224 var u *struct {
225 x struct {
226 x int "bar"
227 } "bar"
228 }
229 s = s
230 s = t
231 s = u
232 s = (*S)(s)
233 s = (*S)(t)
234 s = (*S)(u)
235 t = u
236 t = (*T)(u)
237 }
238
239 func _() {
240 type E1 struct {
241 x int "foo"
242 }
243 type E2 struct {
244 x int "bar"
245 }
246 type S struct{ x E1 }
247 type T struct {
248 x E2 "foo"
249 }
250 var s *S
251 var t *T
252 var u *struct {
253 x E2 "bar"
254 }
255 s = s
256 s = t
257 s = u
258 s = (*S)(s)
259 s = (*S)(t )
260 s = (*S)(u )
261 t = u
262 t = (*T)(u)
263 }
264
265 func _() {
266 type E struct{ x int }
267 type S struct {
268 f func(struct {
269 x int "foo"
270 })
271 }
272 type T struct {
273 f func(struct {
274 x int "bar"
275 })
276 }
277 var s *S
278 var t *T
279 var u *struct{ f func(E) }
280 s = s
281 s = t
282 s = u
283 s = (*S)(s)
284 s = (*S)(t)
285 s = (*S)(u )
286 t = u
287 t = (*T)(u )
288 }
289
290 func _() {
291 type E struct{ x int }
292 type S struct {
293 f func(*struct {
294 x int "foo"
295 })
296 }
297 type T struct {
298 f func(*struct {
299 x int "bar"
300 })
301 }
302 var s *S
303 var t *T
304 var u *struct{ f func(E) }
305 s = s
306 s = t
307 s = u
308 s = (*S)(s)
309 s = (*S)(t)
310 s = (*S)(u )
311 t = u
312 t = (*T)(u )
313 }
314
View as plain text