Skip to content

Commit 85acf89

Browse files
committed
Fix binary encoding for outer core aliases.
This commit is a follow-up to #44 that was missed in review. For outer aliases in module type decls to work, `core:aliastarget` must have an "outer" variant. The validation rules for this variant should only permit `type` sort.
1 parent c6f9068 commit 85acf89

File tree

1 file changed

+5
-2
lines changed

1 file changed

+5
-2
lines changed

design/mvp/Binary.md

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -102,6 +102,7 @@ Notes:
102102
```
103103
core:alias ::= sort:<core:sort> target:<core:aliastarget> => (core alias target (sort))
104104
core:aliastarget ::= 0x00 i:<core:instanceidx> n:<name> => export i n
105+
| 0x01 ct:<u32> idx:<u32> => outer ct idx
105106
106107
alias ::= sort:<sort> target:<aliastarget> => (alias target (sort))
107108
aliastarget ::= 0x00 i:<instanceidx> n:<name> => export i n
@@ -115,8 +116,10 @@ Notes:
115116
of enclosing components and `i` is validated to be a valid
116117
index in the `sort` index space of the `i`th enclosing component (counting
117118
outward, starting with `0` referring to the current component).
118-
* For `outer` aliases, validation restricts the `sort` of the `aliastarget`
119-
to one of `type`, `module` or `component`.
119+
* For `outer` aliases of `core:aliastarget`, validation restricts the `sort` to
120+
`type`.
121+
* For `outer` aliases of `aliastarget`, validation restricts the `sort` to one
122+
of `type`, `module` or `component`.
120123

121124

122125
## Type Definitions

0 commit comments

Comments
 (0)