130 computed member kebab koru182

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

Code

input.k

Actual compiler output

error[KORU182]: 'c[0].x-c' reads as the field name 'x-c', not subtraction — `-` joins identifiers (kebab), and 'c[0]' has no field 'x-c'
  --> tests/regression/300_ADVANCED_FEATURES/390_KERNEL/390_130_computed_member_kebab_koru182/input.k:32:1
    |
 32 | | computed c |> sink(v: c[0].x-c[1].x): r |> std/io:print.ln(v: r)
    | ^
  hint: for subtraction write the segments spaced: 'x - c'

Frontend must reject with:

CONTAINS error[KORU182
CONTAINS reads as the field name 'x-c', not subtraction
CONTAINS 'c[0]' has no field 'x-c'

Flows

flow ~shape click a branch to expand · @labels scroll to their anchor
shape (expr: Body, source: x: f64, mass: f64,)
flow ~init click a branch to expand · @labels scroll to their anchor
init (expr: Body, source: { x: 0.0, mass: 1.0 }, { x: 1.0, mass: 2.0 },)

Test Configuration

MUST_ERROR