mirror of
https://github.com/vercel-labs/scriptc.git
synced 2026-11-07 08:33:50 +08:00
`a[0]?.b.c` read `.c` from undefined when the element was missing: the tail only joined the guard when the checker typed the receiver nullable, and an array or index-signature read is typed present while it lowers to an undefined-armed value. The tail check now also accepts receivers that can lower to a hidden undefined; present receivers re-dispatch the plain lowering. A non-null assertion stays inside the chain (`a?.b!.c`), and parentheses end it for checked-dynamic reads (`(a?.b).c` throws). Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>