218 parallel for nonadditive capture refused

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

Code

input.k

Actual compiler output

error[KORU212]: [parallel]for: `@max(a.acc, @as(i64, @intCast(i)))` is not a provably additive write to `a.acc` — partition needs a combine law (provable monoid); write `acc: a.acc + <expr>` (or `*` / `@rem` fold) or drop [parallel]
  --> tests/regression/400_RUNTIME_FEATURES/400_218_parallel_for_nonadditive_capture_refused/input.k:9:5

Error output must contain

is not a provably additive write

Flows

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

Test Configuration

MUST_ERROR