Skip to content

Commit 8d75db5

Browse files
committed
Also remove quotes from versions, and fix previous syntax error in example
1 parent 3ebfc04 commit 8d75db5

File tree

1 file changed

+7
-7
lines changed

1 file changed

+7
-7
lines changed

design/mvp/WIT.md

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -862,10 +862,10 @@ For example, the following interface has 4 items, 3 of which are gated:
862862
interface foo {
863863
a: func();
864864
865-
@since(version = "0.2.1")
865+
@since(version = 0.2.1)
866866
b: func();
867867
868-
@since(version = "0.2.2", feature = fancy-foo)
868+
@since(version = 0.2.2, feature = fancy-foo)
869869
c: func();
870870
871871
@unstable(feature = fancier-foo)
@@ -903,14 +903,14 @@ gate ::= unstable-gate
903903
| since-gate
904904
unstable-gate ::= '@unstable' '(' feature-field ')'
905905
feature-field ::= 'feature' '=' id
906-
since-gate ::= '@since' '(' 'version' '=' '"' <valid semver> '"' ( ',' feature-field )? ')'
906+
since-gate ::= '@since' '(' 'version' '=' <valid semver> ( ',' feature-field )? ')'
907907
```
908908

909909
As part of WIT validation, any item that refers to another gated item must also
910910
be compatibly gated. For example, this is an error:
911911
```wit
912912
interface i {
913-
@since("1.0.1")
913+
@since(version = 1.0.1)
914914
type t1 = u32;
915915
916916
type t2 = t1; // error
@@ -919,11 +919,11 @@ interface i {
919919
Additionally, if an item is *contained* by a gated item, it must also be
920920
compatibly gated. For example, this is an error:
921921
```wit
922-
@since("1.0.2")
922+
@since(version = 1.0.2)
923923
interface i {
924924
foo: func(); // error: no gate
925925
926-
@since("1.0.1")
926+
@since(version = 1.0.1)
927927
bar: func(); // also error: weaker gate
928928
}
929929
```
@@ -1730,7 +1730,7 @@ package ns:[email protected];
17301730
interface i {
17311731
f: func();
17321732
1733-
@since(version = "1.1.0")
1733+
@since(version = 1.1.0)
17341734
g: func();
17351735
}
17361736
```

0 commit comments

Comments
 (0)