File tree Expand file tree Collapse file tree 1 file changed +21
-1
lines changed Expand file tree Collapse file tree 1 file changed +21
-1
lines changed Original file line number Diff line number Diff line change @@ -905,8 +905,28 @@ unstable-gate ::= '@unstable' '(' feature-field ')'
905
905
feature-field ::= 'feature' '=' id
906
906
since-gate ::= '@since' '(' 'version' '=' '"' <valid semver> '"' ( ',' feature-field )? ')'
907
907
```
908
+
908
909
As part of WIT validation, any item that refers to another gated item must also
909
- be gated.
910
+ be compatibly gated. For example, this is an error:
911
+ ``` wit
912
+ interface i {
913
+ @since("1.0.1")
914
+ type t1 = u32;
915
+
916
+ type t2 = t1; // error
917
+ }
918
+ ```
919
+ Additionally, if an item is * contained* by a gated item, it must also be
920
+ compatibly gated. For example, this is an error:
921
+ ``` wit
922
+ @since("1.0.2")
923
+ interface i {
924
+ foo: func(); // error: no gate
925
+
926
+ @since("1.0.1")
927
+ bar: func(); // also error: weaker gate
928
+ }
929
+ ```
910
930
911
931
## Package declaration
912
932
You can’t perform that action at this time.
0 commit comments