035 construct glyph in consumer arm

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

Code

input.k

Actual compiler output

error[KORU102]: std/channel(inbox): `=>` inside a `! reading` 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/699_CHANNEL/699_035_construct_glyph_in_consumer_arm/input.k:21:0

error[KORU161]: std/channel(inbox): unknown channel — no std/channel:new(inbox) found
  --> tests/regression/600_STDLIB/699_CHANNEL/699_035_construct_glyph_in_consumer_arm/input.k:20:0

error[KORU161]: std/channel:close: no channel named 'inbox' — `std/channel:new(inbox, capacity: N) { kind: Proto }` declares it
  --> tests/regression/600_STDLIB/699_CHANNEL/699_035_construct_glyph_in_consumer_arm/input.k:25:0

error[KORU161]: std/channel:send: no channel named 'inbox' — `std/channel:new(inbox, capacity: N) { kind: Proto }` declares it
  --> tests/regression/600_STDLIB/699_CHANNEL/699_035_construct_glyph_in_consumer_arm/input.k:24:0

error[KORU161]: std/pump(main): `! step`'s body must end in a call to a declared tor - the pump composes compile-time-known verbs
  --> tests/regression/600_STDLIB/699_CHANNEL/699_035_construct_glyph_in_consumer_arm/input.k:33:0

Compiler must reject:

Compilation must fail with a diagnostic.

Flows

flow ~std/proto click a branch to expand · @labels scroll to their anchor
std/proto (Reading, source: id: u64)
flow ~new click a branch to expand · @labels scroll to their anchor
new (expr: inbox, capacity: 8, source: reading: Reading)
flow ~std/channel click a branch to expand · @labels scroll to their anchor
std/channel (inbox)
flow ~mk click a branch to expand · @labels scroll to their anchor
mk (i: 42)
flow ~create click a branch to expand · @labels scroll to their anchor
create (expr: main)
flow ~std/pump click a branch to expand · @labels scroll to their anchor
std/pump (main)
flow ~run click a branch to expand · @labels scroll to their anchor
run (main)

Test Configuration

MUST_ERROR