Skip to content

Commit 86453cf

Browse files
committed
Actually, make it a validation error
1 parent efbde41 commit 86453cf

File tree

1 file changed

+2
-8
lines changed

1 file changed

+2
-8
lines changed

design/mvp/WIT.md

Lines changed: 2 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -905,6 +905,8 @@ unstable-gate ::= '@unstable' '(' feature-field ')'
905905
feature-field ::= 'feature' '=' id
906906
since-gate ::= '@since' '(' 'version' '=' '"' <valid semver> '"' ( ',' feature-field )? ')'
907907
```
908+
As part of WIT validation, any item that refers to another gated item must also
909+
be gated.
908910

909911
## Package declaration
910912

@@ -1710,11 +1712,6 @@ interface i {
17101712
17111713
@since(version = "1.1.0")
17121714
g: func();
1713-
1714-
@since(version = "1.1.0")
1715-
type t1 = u32;
1716-
1717-
type t2 = t1
17181715
}
17191716
```
17201717
is encoded as the following component when the target version is `1.0.0`:
@@ -1727,7 +1724,6 @@ is encoded as the following component when the target version is `1.0.0`:
17271724
))
17281725
)
17291726
```
1730-
Note that `t2` is transitively disabled since it relied on the gated `t1`.
17311727
If the target version was instead `1.1.0`, the same WIT document would be
17321728
encoded as:
17331729
```wat
@@ -1736,8 +1732,6 @@ encoded as:
17361732
(export "ns:p/[email protected]" (instance
17371733
(export "f" (func))
17381734
(export "g" (func))
1739-
(export $t1 "t1" (type (eq u32)))
1740-
(export "t2" (type (eq $t1)))
17411735
))
17421736
))
17431737
)

0 commit comments

Comments
 (0)