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 {
358358}
359359```
360360
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
364363package local:demo
365364
366- world my-world-a {
367- import a1
368- import b1
365+ interface a {
366+ foo: func()
369367}
370368
371- world my-world-b {
372- import a1
373- import b1
369+ world world-using-a {
370+ import a
374371}
375372
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
379375}
380- ```
381376
382377### A Note on SubTyping
383378
You can’t perform that action at this time.
0 commit comments