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 cf665bc commit 5b84168Copy full SHA for 5b84168
design/mvp/Binary.md
@@ -377,7 +377,7 @@ val((record (field l t)+)) ::= v+:<val(t)>+ => (recor
377
val((variant (case l t?)+) ::= i:<core:u32> v?:<val(t[i])>? => (variant l[i] v?)
378
val((list t)) ::= v:vec(<val(t)>) => (list v)
379
val((tuple t+)) ::= v+:<val(t)>+ => (tuple v+)
380
-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))
381
val((enum l+)) ::= i:<core:u32> => (enum l[i])
382
val((option t)) ::= 0x00 => none
383
| 0x01 v:<val(t)> => (some v)
0 commit comments