012 reject pub proc

✓ Passing This code compiles and runs correctly.

Code

// Test: ~pub proc should be rejected
// Only events can be pub, procs cannot.
// Procs are implementation details - they follow their event's visibility.

~pub event greet { name: []const u8 }
| greeted []const u8

// This should cause a compiler error - pub is not valid on procs
~pub proc greet {
    return .{ .greeted = "Hello!" };
}
input.kz

Must fail at frontend compile:

Parsing or type-checking must reject the program.

Expected compiler error

error[PARSE003]: 'pub' is not valid on proc declarations - only events can be public
  --> tests/regression/000_CORE_LANGUAGE/020_EVENTS_FLOWS/020_012_reject_pub_proc/input.kz:9:1
    |
  9 | ~pub proc greet {
    | ^

Error Verification

Expected Error Pattern

pub is not valid on proc declarations - only events can be public

Actual Compiler Output

error[PARSE003]: 'pub' is not valid on proc declarations - only events can be public
  --> tests/regression/000_CORE_LANGUAGE/020_EVENTS_FLOWS/020_012_reject_pub_proc/input.kz:9:1
    |
  9 | ~pub proc greet {
    | ^

Test Configuration

MUST_FAIL