Files
scriptc/tests
Malte UblandClaude Opus 5.5 bf28595035 Lower promise methods called through an optional chain
`p?.catch(h)`, `p?.then(h)` and a guarded chain tail (`f()?.then(h)`)
were refused: the promise-method lowering rejected every
`questionDotToken` instead of asking whether the optional chain was
currently being lowered, so the guarded body never reached it. It uses
`chainBlocked` now, like every other lowering that rides the chain.

The call that ENDS a chain checker-types as the chain's undefined-armed
union (`Promise<T> | undefined`) while this lowering builds the promise
arm, which `finishOptionalChain` wraps back into the union. The
handler's result type takes that arm, so the handler is typed against
the promise it actually handles.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-28 05:37:50 -07:00
..
…
2026-10-27 16:45:14 -05:00