130 call in captured field

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

Code

input.k

Actual compiler output

error[KORU104]: nested call in captured field 'acc' — calls are not expressions; use tor chaining: bind the result first
  --> tests/regression/320_CONTROL_FLOW/320_130_call_in_captured_field/input.k:18:4
    |
 18 |     ! each i |> captured { acc: s.acc + g(a: @as(i64, @intCast(i))) }
    |    ^
  hint: rewrite as `tor(args): x |> ...` and use `x` here

Frontend must reject with:

CONTAINS error[KORU104
CONTAINS nested call
CONTAINS chain

Flows

flow ~capture click a branch to expand · @labels scroll to their anchor
capture (source: acc: 0[i64])

Test Configuration

MUST_ERROR