mirror of
https://github.com/vercel-labs/scriptc.git
synced 2026-11-05 08:13:06 +08:00
The conditional-spread, asserted-probe, and asserted-element-probe commits each answered a shape that previously refused, but three paths also re-lowered code that already compiled: - A checked-dynamic literal's conditional source is now lowered arm by arm only when the literal is built for a declared record target, so a literal already built as a plain dynamic object keeps its established lowering. - An asserted member probe counts arms the way the extraction threshold always has, plus getter-backed arms beside an arm with no read at all: a union whose arms all declare the member keeps the assertion's extraction. - An asserted element probe checks the stored value's checker type before speculatively lowering the receiver, so a non-union receiver leaves no synthesized helpers behind. The zero-cost gate reports no difference for corpus/7020-conditional- spread-fields.ts, corpus/6474-index-record-spread-literals.ts, corpus/6475-dynamic-spread-literals.ts, corpus/asserted-arm-probe.ts, and corpus/8014-foreign-element-callbacks.ts; the new corpus programs (8501-8504, 8510-8513, tuple-dynamic-index, record-subset-keyed-read, union-mixed-field-write) pin the behavior both ways. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>