Skip to content

Commit 0a37def

Browse files
authored
Document fixed-size-lists must be non-empty (#504)
Currently the component model and WIT generally avoid zero-sized types since they're not always handled well in all languages. Given the niche use case of a zero-sized list add a validation rule that fixed-size-lists are non-zero in length. Closes #503
1 parent 29bf377 commit 0a37def

File tree

2 files changed

+3
-1
lines changed

2 files changed

+3
-1
lines changed

design/mvp/Binary.md

+2
Original file line numberDiff line numberDiff line change
@@ -275,6 +275,8 @@ Notes:
275275
to match the preceding `sort`.
276276
* (The `0x00` immediate of `case` may be reinterpreted in the future as the
277277
`none` case of an optional immediate.)
278+
* 🔧 for fixed-sized lists the length of the list must be larger than 0 to pass
279+
validation.
278280

279281

280282
## Canonical Definitions

design/mvp/Explainer.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -672,7 +672,7 @@ and sequencing contained values.
672672

673673
🔧 When the optional `<u32>` immediate of the `list` type constructor is present,
674674
the list has a fixed length and the representation of the list in memory is
675-
specialized to this length.
675+
specialized to this length. Note that the fixed length must be larger than 0.
676676

677677
##### Handle types
678678

0 commit comments

Comments
 (0)