You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Commit 0a0d83c
Browse filesBrowse the repository at this point in the historyBrowse files
Copy file name to clipboardExpand all lines: design/mvp/WIT.md
+14-10Lines changed: 14 additions & 10 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -308,6 +308,9 @@ world union-my-world {
308
308
}
309
309
```
310
310
311
+
TODO: add `optional` to some of the `include` examples above (unions *both* imports and exports)
312
+
TODO: add a note that `include` does not produce subtype or supertype, but other ways to combine worlds (`meet` and `join`) could be added in the future
313
+
311
314
### De-duplication of interfaces
312
315
313
316
If two worlds share an imported or exported [interface name], then the union of
@@ -339,6 +342,8 @@ world union-my-world-b {
339
342
}
340
343
```
341
344
345
+
TODO: mention merging of `optional` and non-`optional`~~> non-`optional`
346
+
342
347
### Name Conflicts and `with`
343
348
344
349
When two or more included Worlds have the same name for an import or export
@@ -436,12 +441,6 @@ world invalid-union-world {
436
441
437
442
```
438
443
439
-
### A Note on Subtyping
440
-
441
-
In the future, when `optional` export is supported, the world author may explicitly mark exports as optional to make a component targeting an included World a subtype of the union World.
442
-
443
-
For now, we are not following the subtyping rules for the `include` statement. That is, the `include` statement does not imply any subtyping relationship between the included worlds and the union world.
444
-
445
444
## WIT Packages and `use`
446
445
[use]: #wit-packages-and-use
447
446
@@ -563,6 +562,8 @@ interface my-interface {
563
562
}
564
563
```
565
564
565
+
TODO: `use` resolution when only used from `optional`y-imported interfaces --> `optional`
566
+
566
567
#### Top-level `use`
567
568
568
569
If a package being referred to has a version number, then using the above syntax
0 commit comments