Files
scriptc/tests
Malte UblandClaude Opus 5.5 ee63d4a607 Distribute conditional members over a generic body's bound parameter
A generic body reading a member typed by a distributive conditional over
its type parameter (`opts?: T extends "alpha" ? AlphaOpts : T extends
"beta" ? BetaOpts : never`) refused it with SC2009 when the instance bound
T to a union of literals (`"alpha" | "gamma"`, `"a" | (string & {})`), and
mapped it as `number | undefined` (never's placeholder) when the binding
selected only never, while the concrete instantiation maps that member as
`null | undefined`; values crossing between the two failed with SC2003.

The conditional now distributes over the binding as the checker does: each
member evaluates, the non-never results form the union, an open `string &
{}` member checks as `string`, and an all-never result leaves an optional
member that holds only undefined.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-25 13:37:14 -07:00
..
…
2026-10-25 02:06:50 -05:00