006 store reject watch body ambient context

✓ Passing Passing: the compiler rejects this program as expected.

Code

input.kz

Actual compiler output

error[KORU161]: std/store: watch body references 'ctx', runtime state of the enclosing flow - a watch body executes at 'game's write sites, not here; bind it through a store or react at a write site
  --> tests/regression/600_STDLIB/690_STORE/690_006_store_reject_watch_body_ambient_context/input.kz:33:0

Backend must reject with:

CONTAINS watch body
CONTAINS ctx
CONTAINS write sites

Error output must contain

watch body references 'ctx', runtime state of the enclosing flow — a watch body executes at 'game's write sites, not here; bind it through a store or react at a write site

Flows

flow ~new click a branch to expand · @labels scroll to their anchor
new (game, source: entities: 0[i64])
flow ~setup click a branch to expand · @labels scroll to their anchor
setup

Test Configuration

MUST_ERROR LANGUAGES: zig cs