Problem
AwaitExpr currently falls through the checker's default Void result. As a consequence, locals initialized from await async_call() are typed void, and both examples/async_basic.home and examples/async.home fail when those locals are returned.
The checker also exposes an async call as its payload type directly, so it cannot reject await on ordinary values or distinguish a future from its resolved value.
Scope
- Represent async call results as
Future<T>in the semantic type system. - Mark function signatures as async without changing body return checking.
- Unwrap
Future<T>atawaitand reject awaiting non-future values. - Cover direct async calls, concrete awaited result types, and invalid awaits.
- Re-run the examples acceptance gate.
Acceptance criteria
let value = await async_fn()infers the declared payload type.- Calling an async function without awaiting produces
Future<T>, notT. await 1is a type error.async_basic.homeandasync.homepasshome check.