Skip to content
ZOLO / TE224 Type · error

await is unsupported inside a generator

`await` appeared inside a `fn*` generator. Async generators have no scheduler contract shared by every backend yet, so Zolo rejects the combination instead of letting one backend resume it with different semantics than another.

Why this fires

await appeared inside fn*. Async generators do not yet have a scheduler contract shared by every backend, so Zolo rejects this combination instead of letting one backend resume it with different semantics.

async fn load() -> int { 1 }
fn* values() -> int { yield await load() } // TE224

Fix it

Await the work in an async fn before constructing or consuming the generator, or pass the resolved values into a synchronous fn*. This diagnostic can be relaxed only after async-generator suspension has backend parity.

Global index

Find your way through Zolo

Try an idea

Start here

9 results

9 results

enespt-br