002 grid index out of range traps

✓ Passing This code compiles and runs correctly.

Code

input.k

Actual

before
thread 338417216 panic: std/grid: y out of range for grid 'lights' (rows 4)
???:?:?: 0x105092407 in _output_emitted.main_module.__KoruGridT_lights.__koru_at2__anon_19369 (???)
???:?:?: 0x105091c07 in _output_emitted.main_module.__grid_write_L24_a3da_event.__koru_handler_impl (???)
???:?:?: 0x10509188f in _output_emitted.main_module.flow1 (???)
???:?:?: 0x105091757 in _output_emitted.main (???)
???:?:?: 0x10509166b in _main (???)
???:?:?: 0x18eec7dff in ??? (???)
???:?:?: 0x0 in ??? (???)

Flows

flow ~new click a branch to expand · @labels scroll to their anchor
new (expr: lights, dimensions: 4x5, source: on: 0[i64])
flow ~print.ln click a branch to expand · @labels scroll to their anchor
print.ln (expr: "before")
flow ~stored click a branch to expand · @labels scroll to their anchor
stored (source: lights[1, 9].on: 1)
flow ~print.ln click a branch to expand · @labels scroll to their anchor
print.ln (expr: "unreachable")

Test Configuration

MUST_RUN