Skip to content

Commit 0820d22

Browse files
Mossakalukewagner
andauthored
Update design/mvp/WIT.md
Co-authored-by: Luke Wagner <[email protected]>
1 parent 5f4f5e0 commit 0820d22

File tree

1 file changed

+8
-13
lines changed

1 file changed

+8
-13
lines changed

design/mvp/WIT.md

Lines changed: 8 additions & 13 deletions
Original file line numberDiff line numberDiff 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
364363
package 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

0 commit comments

Comments
 (0)