013 fmt ln scoped param laundering

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

Code

input.k

Actual compiler output

error[KORU030]: argument 'l.text' is @scoped — it dies with its frame and parameter 'data' declares no scoped acceptance. Declare it 'string<*@scoped>' (the borrow stays confined inside the callee), or copy it out first (std/string:from-page + take / fmt.blk)
  --> tests/regression/600_STDLIB/620_FMT/620_013_fmt_ln_scoped_param_laundering/input.k:15:1

Must fail at runtime:

Program must error when executed.

Error output must contain

declares no scoped acceptance

Flows

subflow ~identity 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