✓
Passing Passing: the compiler rejects this program as expected.
Code
// SUBFLOW-IMPLEMENTED EFFECTS, record-fire diagnostics — a fire that supplies
// only SOME declared fields reports the missing one. `pair(a: 1)` leaves
// `b` unsupplied; the KORU022 names the absent field and the full declared
// list. (Sibling: 400_225 pins that an UNKNOWN arg suppresses this loop —
// a misspelled field is not a missing field.)
pub tor calc { n: i64 }
! pair { a: i64, b: i64 }
| done i64
calc = pair(a: 1)
| done => done 0
calc(n: 1)
| done _
Actual compiler output
error[KORU022]: effect 'pair' payload field 'b' missing at the firing site (pair(a: ..., b: ...))
--> tests/regression/400_RUNTIME_FEATURES/400_226_effect_record_fire_missing_field_reports/input.k:10:1Backend must reject with:
CONTAINS error[KORU022]
CONTAINS payload field 'b' missing at the firing site
ERROR_AT 10Flows
subflow ~calc click a branch to expand · @labels scroll to their anchor
pair (a: 1)
flow ~calc click a branch to expand · @labels scroll to their anchor
calc (n: 1)
Test Configuration
MUST_ERROR