016 construct glyph in sweep arm

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

Code

input.k

Actual compiler output

error[KORU102]: std/grid:sweep(cells): `=>` inside a `! sweep` arm has nothing to construct — the arm body grafts into a void synthesized unit, so a branch of the enclosing tor cannot be produced from in there. Hand the verdict out through the enclosing surface and branch after it returns.
  --> tests/regression/600_STDLIB/697_GRID/697_016_construct_glyph_in_sweep_arm/input.k:20:0

Compiler must reject:

Compilation must fail with a diagnostic.

Flows

flow ~new click a branch to expand · @labels scroll to their anchor
new (cells, size: 4, source: count: 0[i64])
flow ~new click a branch to expand · @labels scroll to their anchor
new (box, capacity: 4, source: n: i64)
subflow ~work click a branch to expand · @labels scroll to their anchor
sweep (cells)
flow ~insert click a branch to expand · @labels scroll to their anchor
insert (box, source: n: 1)

Test Configuration

MUST_ERROR