015 fmt ln scoped param produce out

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

Code

input.k

Actual compiler output

error[KORU030]: 'data' is @scoped — it dies with this frame and may not be produced out. Consume it in place, or copy it out first (std/string:from-page + take / fmt.blk)
  --> tests/regression/600_STDLIB/620_FMT/620_015_fmt_ln_scoped_param_produce_out/input.k:8:1

Must fail at runtime:

Program must error when executed.

Error output must contain

may not be produced out

Flows

subflow ~launder click a branch to expand · @labels scroll to their anchor
print.ln (expr: data)
flow ~ln click a branch to expand · @labels scroll to their anchor
ln ("item {{ 1:d }}")

Test Configuration

MUST_ERROR