Files
scriptc/packages
Malte UblandClaude Opus 5.5 6014bb4ea5 Keep a returned arrow's own return type in a void slot
A value-returning arrow returned through a `() => void` interface member
was adopted as void, so the enclosing function promised `() => number`
while the lambda built a void closure: "a void result where the
'() => number' slot promises ..." natively, though Node runs it
(`repros/d2-void-slot-generic.ts`, pi `event-bus.ts:27`).

A lambda that is the returned value of the function being lowered reaches
that function's caller, so its own return type must survive the checker's
void contextual type; the void adoption in lambdaSignature now skips such
a lambda. Functions with a void result keep the existing discard
semantics.

tests/corpus/void-slot-returned-arrow.ts pins the shape both ways.

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