mirror of
https://github.com/vercel-labs/scriptc.git
synced 2026-11-01 07:33:12 +08:00
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>