Commit Graph
2 Commits
Author SHA1 Message Date
mtlcl410 50ed2e55da fix(hayro-syntax): a failed typed read leaves an unreadable array slot in place
FlexArrayIter::next::<T> stepped over a lone-sign slot before finding that
null is not a T, so a caller that then read the slot as another type got
the item after it. The slot is now passed only when null is a T, as a value
of another type is left in place. The sign-token tests also require the
lone-sign fixtures to parse and check raw_iter's null slots directly.
2026-11-12 12:28:05 +08:00
mtlcl410 b06bedefa6 fix(hayro-syntax): a lone sign in a dictionary or array is unreadable, not a panic
A lone + or ++ passes the first pass, which skips it as a number, but no
number is read from it (ISO 32000-2 7.3.3). Dict::entries and Dict's Debug
unwrapped the failed read and panicked, Array::raw_iter did too, and
Array::iter stopped there and dropped the items after it.

Vendor patch (46): a dictionary leaves such an entry out, as Dict::get
already did (7.3.7), and an array reads it as null in its slot (7.3.9). A
typed read still ends at it, as at any value of another type.
2026-11-12 07:14:32 +08:00