You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
gen_function previously fell through to synchronous gen_expr whenever the
ADR-013 CPS transform did not fire — even for an `Async` fn whose async-call
result is consumed by a continuation. That silently ran the continuation
against an unsettled Thenable handle (a wrong value, no diagnostic).
Add a precise fence: fail loud (UnsupportedFeature) when an `Async` fn performs
an async call consumed by a continuation that cannot be CPS-lowered, while
still lowering the sound shapes — the `let r = <async-call>; <cont>` base case
(transformed), the bare tail-return-Thenable pass-through (#205 convergence
protocol), and an `Async` fn that performs no async call. Mirrors the
#555/#566 "fail loud, never silent" fence in the same file.
Regression tests (test/test_e2e.ml, "E2E Async Fence (#556)"):
- async_sync_fallback.affine → loud UnsupportedFeature (negative)
- async_passthrough_thenable.affine → still compiles (no over-rejection)
- async_no_boundary.affine → still compiles (no over-rejection)
Full suite 454/454 green.
Closes#556
Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
0 commit comments