✓
Passing This code compiles and runs correctly.
Code
// Test: ~pub ~proc variant is also rejected
// Parser catches both "pub proc" and "pub ~proc" variants
~event foo { x: i32 }
~pub ~proc foo = done {}
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/500_INTEGRATION_TESTING/510_NEGATIVE_TESTS/510_065_pub_proc_double_tilde/input.kz:6:1
|
6 | ~pub ~proc foo = done {}
| ^