mirror of
https://github.com/vercel-labs/scriptc.git
synced 2026-11-07 08:33:50 +08:00
The runtime-optional analysis widens a parameter or binding that can observe undefined with an undefined arm. For a Date it interned the union `Date | undefined`, which is not a valid union (Date is not a union arm kind), and the whole program failed IR validation with SC9001 "union uN: arm 0 is date" (morgan's date token and clfdate). Like generators, a Date keeps its type: the canonical undefined-arm helper already refuses Date, and a site that would store undefined into the slot keeps its own diagnostic. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>