Skip to content

Commit 8c066b4

Browse files
committed
Extend example to cover transitive gating
1 parent d7f4917 commit 8c066b4

File tree

1 file changed

+10
-2
lines changed

1 file changed

+10
-2
lines changed

design/mvp/WIT.md

Lines changed: 10 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1689,10 +1689,15 @@ For example, the following WIT document:
16891689
package ns:[email protected];
16901690
16911691
interface i {
1692-
f: func()
1692+
f: func();
16931693
16941694
@since(version = "1.1.0")
1695-
g: func()
1695+
g: func();
1696+
1697+
@since(version = "1.1.0")
1698+
type t1 = u32;
1699+
1700+
type t2 = t1
16961701
}
16971702
```
16981703
is encoded as the following component when the target version is `1.0.0`:
@@ -1705,6 +1710,7 @@ is encoded as the following component when the target version is `1.0.0`:
17051710
))
17061711
)
17071712
```
1713+
Note that `t2` is transitively disabled since it relied on the gated `t1`.
17081714
If the target version was instead `1.1.0`, the same WIT document would be
17091715
encoded as:
17101716
```wat
@@ -1713,6 +1719,8 @@ encoded as:
17131719
(export "ns:p/[email protected]" (instance
17141720
(export "f" (func))
17151721
(export "g" (func))
1722+
(export $t1 "t1" (type (eq u32)))
1723+
(export "t2" (type (eq $t1)))
17161724
))
17171725
))
17181726
)

0 commit comments

Comments
 (0)