Skip to content

Commit 1ddf5d7

Browse files
authored
Merge pull request #190 from WebAssembly/fix-validation
fix annotated name validation rules in Binary.md
2 parents 79c0614 + dc515fe commit 1ddf5d7

File tree

1 file changed

+4
-2
lines changed

1 file changed

+4
-2
lines changed

design/mvp/Binary.md

+4-2
Original file line numberDiff line numberDiff line change
@@ -109,8 +109,10 @@ Notes:
109109
to the actual type.
110110
* The indices in `sortidx` are validated according to their `sort`'s index
111111
spaces, which are built incrementally as each definition is validated.
112-
* Validation requires that all annotated `name`s only occur on `func` `export`s
113-
and that the `r` `label` matches the `name` of a preceding `resource` export.
112+
* Validation requires that annotated `name`s only occur on `func` imports or
113+
exports and that the `r:<label>` matches the `name` of a preceding `resource`
114+
import or export, respectively, in the same scope (component, component type
115+
or instance type).
114116
* Validation of `[constructor]` names requires that the `func` returns a
115117
`(result (own $R))`, where `$R` is the resource labeled `r`.
116118
* Validation of `[method]` names requires the first parameter of the function

0 commit comments

Comments
 (0)