011 fmt ln scratch borrow overwrites

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

Code

input.k

Actual compiler output

error[KORU030]: 'l.text' 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_011_fmt_ln_scratch_borrow_overwrites/input.k:20:1

Must fail at runtime:

Program must error when executed.

Error output must contain

'l.text' is @scoped

Flows

subflow ~render click a branch to expand · @labels scroll to their anchor
ln ("item {{ n:d }}")
flow ~render click a branch to expand · @labels scroll to their anchor
render (n: 1)

Test Configuration

MUST_ERROR