006 reject private event in contract

○ Planned This feature is planned but not yet implemented.

Rework as a cross-module private-event VISIBILITY test. KORU111 Rule 1 (private event in .k rejected) was removed 2026-07-17 — private events are legal in a .k full program. The surviving intent here is that a PRIVATE event must not be callable across a module boundary; that needs cross-module visibility enforcement (see 110_002 TODO) before this can be re-pinned.

Code

input.kz

Frontend must reject with:

CONTAINS KORU111
CONTAINS private event in contract file

Error Verification

Actual Compiler Output

error[KORU111]: private event in contract file '/Users/larsde/src/koru/tests/regression/100_MODULE_SYSTEM/140_FILE_LAYOUT/140_006_reject_private_event_in_contract/contract.k'
  --> tests/regression/100_MODULE_SYSTEM/140_FILE_LAYOUT/140_006_reject_private_event_in_contract/input.kz:6:0
    |
  6 | 
    | ^
  hint: events declared in a .k contract file must be ~pub; either add ~pub or move this declaration to a non-.k implementation file

Flows

flow ~compute click a branch to expand · @labels scroll to their anchor
compute (x: 42)

Imported Files

contract.kz

Test Configuration

MUST_FAIL