042 defined flow recursion capped

✓ Passing This code compiles and runs correctly.

Code

input.k

Actual

  defined drain
tick
tick
tick
  unhandled done
  defined loop
emit: once
  unhandled ok
  defined loop
  refused: defined flow 'loop' exceeded the dispatch depth cap (64) — its body calls itself with no outcome that stops it
emit: alive
  unhandled ok

Expected output

  defined drain
tick
tick
tick
  unhandled done
  defined loop
emit: once
  unhandled ok
  defined loop
  refused: defined flow 'loop' exceeded the dispatch depth cap (64) — its body calls itself with no outcome that stops it
emit: alive
  unhandled ok

Flows

flow ~register click a branch to expand · @labels scroll to their anchor
register (scope: "rec", source: next(1) emit(1))
subflow ~run-it click a branch to expand · @labels scroll to their anchor
run (br, source)
flow ~create click a branch to expand · @labels scroll to their anchor
create (id: "rec-cap", scope: "rec")

Test Configuration

MUST_RUN