Update Illegal types

This commit is contained in:
Hsiao-Wei Wang 2019-07-25 17:26:27 +08:00
parent c01995436e
commit 62138fed34
No known key found for this signature in database
GPG Key ID: 95B070122902DEA4
1 changed files with 4 additions and 2 deletions

View File

@ -75,7 +75,7 @@ For convenience we alias:
* `bit` to `boolean`
* `byte` to `uint8` (this is a basic type)
* `BytesN` to `Vector[byte, N]` (this is *not* a basic type)
* `null`: `{}`, i.e. the empty container
* `null`: `{}`
### Default values
@ -87,7 +87,9 @@ An SSZ object is called empty (and thus, `is_empty(object)` returns true) if it
### Illegal types
The empty `Vector[subtype, N]` and `Bitvector[N]` types, where `N == 0` are not legal. The `null` type is only legal as the first type in a union subtype (i.e. with type index zero).
- Empty vector types (`Vector[type, 0]`, `Bitvector[0]`) are illegal.
- Containers with no fields are illegal.
- The `null` type is only legal as the first type in a union subtype (i.e. with type index zero).
## Serialization