Skip to content
ZOLO / TE224 Type · error

await is unsupported inside a generator

Compiler diagnostic TE224: await is unsupported inside a generator.

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

en