004 keyword requires pub

✓ Passing This code compiles and runs correctly.

Code

// Test: [keyword] on private event should error
// [keyword] requires pub because private events can't be imported

~[keyword] event private_thing {}

~proc private_thing {
    // This should never run - the error is at parse time
}
input.kz

Error Verification

Expected Error Pattern

[keyword] on private event should produce compile error

Actual Compiler Output

error[PARSE003]: [keyword] annotation requires 'pub' - only public events can be keywords
  --> tests/regression/300_ADVANCED_FEATURES/330_KEYWORD/330_004_keyword_requires_pub/input.kz:4:1
    |
  4 | 
    | ^

Test Configuration

MUST_FAIL

Expected Behavior:

FRONTEND_COMPILE_ERROR [keyword] annotation requires 'pub'