We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent c3f309b commit b8c31b0Copy full SHA for b8c31b0
design/mvp/Binary.md
@@ -380,7 +380,7 @@ val((record (field l t)+)) ::= v+:<val(t)>+ => (recor
380
val((variant (case l t?)+) ::= i:<core:u32> v?:<val(t[i])>? => (variant l[i] v?)
381
val((list t)) ::= v:vec(<val(t)>) => (list v)
382
val((tuple t+)) ::= v+:<val(t)>+ => (tuple v+)
383
-val((flags l+)) ::= (v:<core:byte>)^N => (flags (l[i] for i in 0..N-1 if v & 2^i > 0)) (where N = ceil(|l+| / 8))
+val((flags l+)) ::= (v:<core:byte>)^N => (flags (l[i] for i in 0..|l+|-1 if v[floor(i / 8)] & 2^(i mod 8) > 0)) (where N = ceil(|l+| / 8))
384
val((enum l+)) ::= i:<core:u32> => (enum l[i])
385
val((option t)) ::= 0x00 => none
386
| 0x01 v:<val(t)> => (some v)
0 commit comments