Files
scriptc/tests
Malte UblandClaude Opus 5.5 e86800de67 Spread unions with several record arms
An object spread of a union with several record arms was refused. Two
cases are now lowered. Where the checker narrowed the source to fewer
arms than its stored union holds (an optional-chain discriminant test
on an element read, a type predicate), the source converts through the
checked narrowing, so an excluded arm throws the catchable TypeError,
and the narrowed record spreads as before. A union spread into one
declared record copies each arm's own keys behind its tag test: a key
the running arm lacks keeps the earlier value or stays absent. One
record arm emits the same code as before.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-29 05:37:44 -07:00
..
…