Files
scriptc/tests/corpus/7736-key-order-replaceable-method-result
Malte UblandClaude Opus 5.5 0e0458f292 Keep literal key order through self copies and conversions that build no records
A literal that starts by spreading a value of its own type, such as
`{ ...current, ...patch, updatedAt }`, made the key-order witness give up
on the type: the copy's source order was the type's own order, seeded
with the declared table, so it conflicted with the literals that build
the values. While no checked conversion builds the type, every value has
the one chosen order and the copy adds no witness.

Checked conversions also counted as builders of records they cannot
create: a class instance's field records, a checked function's record
parameters, a boxed primitive (the undefined a dynamic construction
passes for a missing argument), and the result of a typed call of a
method the program may replace on its instance, which without a
replacement is the method's own native value boxed and checked back.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-23 02:38:33 -07:00
..