File tree Expand file tree Collapse file tree 1 file changed +8
-13
lines changed Expand file tree Collapse file tree 1 file changed +8
-13
lines changed Original file line number Diff line number Diff line change @@ -358,26 +358,21 @@ world union-my-world-b {
358
358
}
359
359
```
360
360
361
- The following example shows an invalid example that ` with ` is used when the import or export name is an ID:
362
-
363
- ``` wi
361
+ ` with ` cannot be used to rename IDs, however, so the following world would be invalid:
362
+ ``` wit
364
363
package local:demo
365
364
366
- world my-world-a {
367
- import a1
368
- import b1
365
+ interface a {
366
+ foo: func()
369
367
}
370
368
371
- world my-world-b {
372
- import a1
373
- import b1
369
+ world world-using-a {
370
+ import a
374
371
}
375
372
376
- world union-my-world-a {
377
- include my-world-a with { a1 as a3 }
378
- include my-world-b with { a1 as a2 }
373
+ world invalid-union-world {
374
+ include my-using-a with { a as b } // invalid: 'a', which is short for 'local:demo/a', is an ID
379
375
}
380
- ```
381
376
382
377
### A Note on SubTyping
383
378
You can’t perform that action at this time.
0 commit comments