mirror of
https://github.com/vercel-labs/scriptc.git
synced 2026-11-09 12:57:34 +08:00
A record held in another record's field (`state.parsed`) and passed to a function that stores a possibly missing array element in it kept its declared layout, so the store threw where Node stores undefined. The field read opened the record flow class of the function's parameter. Such a field read now gets a field slot in the record flow classes. Field slots join the same field of every member of the owner's class, take the values literals and assignments store in the field, and widen only when the owner's class can take the new layout too. Every member of the owner's class then holds the widened record, so writes and identity are kept. An owner that is spread, destructured or passed to Object.values or Object.entries keeps the declared layout.