|
249 | 249 | ) |
250 | 250 |
|
251 | 251 | (component |
252 | | - (import "C" (component $C |
253 | | - (export "T1" (type (sub resource))) |
254 | | - (export "T2" (type $T2 (sub resource))) |
255 | | - (export "T3" (type (eq $T2))) |
256 | | - )) |
257 | | - (instance $c (instantiate $C)) |
258 | | - (alias export $c "T1" (type $T1)) |
259 | | - (alias export $c "T2" (type $T2)) |
260 | | - (alias export $c "T3" (type $T3)) |
| 252 | + (component |
| 253 | + (import "C" (component $C |
| 254 | + (export "T1" (type (sub resource))) |
| 255 | + (export "T2" (type $T2 (sub resource))) |
| 256 | + (export "T3" (type (eq $T2))) |
| 257 | + )) |
| 258 | + (instance $c (instantiate $C)) |
| 259 | + (alias export $c "T1" (type $T1)) |
| 260 | + (alias export $c "T2" (type $T2)) |
| 261 | + (alias export $c "T3" (type $T3)) |
| 262 | + ) |
261 | 263 | ) |
262 | 264 |
|
263 | 265 | (component |
|
299 | 301 | )) |
300 | 302 | ) |
301 | 303 |
|
302 | | -(component $P |
303 | | - (import "C1" (component $C1 |
304 | | - (import "T" (type $T (sub resource))) |
305 | | - (export "foo" (func (param "t" (own $T)))) |
306 | | - )) |
307 | | - (import "C2" (component $C2 |
308 | | - (import "T" (type $T (sub resource))) |
309 | | - (import "foo" (func (param "t" (own $T)))) |
310 | | - )) |
311 | | - (type $R (resource (rep i32))) |
312 | | - (instance $c1 (instantiate $C1 (with "T" (type $R)))) |
313 | | - (instance $c2 (instantiate $C2 |
314 | | - (with "T" (type $R)) |
315 | | - (with "foo" (func $c1 "foo")) |
316 | | - )) |
| 304 | +(component |
| 305 | + (component $P |
| 306 | + (import "C1" (component $C1 |
| 307 | + (import "T" (type $T (sub resource))) |
| 308 | + (export "foo" (func (param "t" (own $T)))) |
| 309 | + )) |
| 310 | + (import "C2" (component $C2 |
| 311 | + (import "T" (type $T (sub resource))) |
| 312 | + (import "foo" (func (param "t" (own $T)))) |
| 313 | + )) |
| 314 | + (type $R (resource (rep i32))) |
| 315 | + (instance $c1 (instantiate $C1 (with "T" (type $R)))) |
| 316 | + (instance $c2 (instantiate $C2 |
| 317 | + (with "T" (type $R)) |
| 318 | + (with "foo" (func $c1 "foo")) |
| 319 | + )) |
| 320 | + ) |
317 | 321 | ) |
318 | 322 |
|
319 | 323 | (component |
320 | | - (import "C1" (component $C1 |
321 | | - (import "T1" (type $T1 (sub resource))) |
322 | | - (import "T2" (type $T2 (sub resource))) |
323 | | - (export "foo" (func (param "t" (tuple (own $T1) (own $T2))))) |
324 | | - )) |
325 | | - (import "C2" (component $C2 |
326 | | - (import "T" (type $T (sub resource))) |
327 | | - (export "foo" (func (param "t" (tuple (own $T) (own $T))))) |
328 | | - )) |
329 | | - (type $R (resource (rep i32))) |
330 | | - (instance $c1 (instantiate $C1 |
331 | | - (with "T1" (type $R)) |
332 | | - (with "T2" (type $R)) |
333 | | - )) |
334 | | - (instance $c2 (instantiate $C2 |
335 | | - (with "T" (type $R)) |
336 | | - (with "foo" (func $c1 "foo")) |
337 | | - )) |
| 324 | + (component |
| 325 | + (import "C1" (component $C1 |
| 326 | + (import "T1" (type $T1 (sub resource))) |
| 327 | + (import "T2" (type $T2 (sub resource))) |
| 328 | + (export "foo" (func (param "t" (tuple (own $T1) (own $T2))))) |
| 329 | + )) |
| 330 | + (import "C2" (component $C2 |
| 331 | + (import "T" (type $T (sub resource))) |
| 332 | + (export "foo" (func (param "t" (tuple (own $T) (own $T))))) |
| 333 | + )) |
| 334 | + (type $R (resource (rep i32))) |
| 335 | + (instance $c1 (instantiate $C1 |
| 336 | + (with "T1" (type $R)) |
| 337 | + (with "T2" (type $R)) |
| 338 | + )) |
| 339 | + (instance $c2 (instantiate $C2 |
| 340 | + (with "T" (type $R)) |
| 341 | + (with "foo" (func $c1 "foo")) |
| 342 | + )) |
| 343 | + ) |
338 | 344 | ) |
339 | 345 |
|
340 | 346 | (assert_invalid |
|
0 commit comments