219 parallel for item bound modulus refused

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

Code

input.k

Actual compiler output

Error: output_emitted.zig:148:17: error: [parallel]for: `@rem(__koru_parcell_a.acc + 7, @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]
                @compileError("[parallel]for: `@rem(__koru_parcell_a.acc + 7, @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]");
                ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
referenced by:
    flow0: output_emitted.zig:175:41
    main: output_emitted.zig:231:22
    4 reference(s) hidden; use '-freference-trace=6' to see all references
output_emitted.zig:148:17: error: [parallel]for: `@rem(__koru_parcell_a.acc + 7, @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]
                @compileError("[parallel]for: `@rem(__koru_parcell_a.acc + 7, @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]");
                ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

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