Files
scriptc/packages
Malte UblandClaude Opus 5.5 00467fdcf6 Append a flatMap callback's TUPLE result arms in order
A block-bodied callback whose enclosing call has a contextual array
type infers a tuple union rather than an array union: `return pair ?
[pair] : []` in a `f(): T[]` infers `[] | [pair]`. The flatten plan
classified only array arms, so such a callback refused.

The empty-arm detection now recognizes the empty tuple (a bare `[]` arm
under a contextual array type), and the plan gains a `tuple` arm for a
one-field-or-more tuple whose fields all contribute: each field is
appended in order, exactly as an array arm's elements are. `checker.
isArrayType` is false for tuples, so the arm scan accepts
`isTupleType` too.

Corpus 8525 pins the tuple arm, a two-field tuple arm, and an array arm
beside a scalar arm.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-29 05:38:12 -07:00
..
2026-10-27 23:02:33 -05:00
2026-10-26 13:25:42 -05:00