012 reject pub proc

✓ Passing This code compiles and runs correctly.

Code

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