✓
Passing This code compiles and runs correctly.
Code
// Test 8211: Bare ~proc declarations are unresolvable when called.
// MUST_FAIL: KORU110 - event 'compute' is called but its proc has no |variant tag.
//
// Phase 1 of MULTI_VARIANT_PLAN.md (variant-mandatory): naked `~proc name { ... }`
// remains parseable but unresolvable. A call site that finds only bare procs
// must error with a teaching message that suggests adding `|zig`.
const std = @import("std");
~event compute {}
// Bare proc - no |variant tag. Unresolvable.
~proc compute {
}
// Call site triggers KORU110.
~compute()
Must fail at frontend compile:
Parsing or type-checking must reject the program.
Expected compiler error
error[KORU110]: event 'compute' is called but its ~proc declaration has no |variant tag — bare procs are unresolvable
--> tests/regression/300_ADVANCED_FEATURES/370_VARIANTS/8211_bare_proc_call_site_fails/input.kz:17:0
|
17 | ~compute()
| ^
hint: tag the proc with a host: `~proc compute|zig { ... }` (or another host like |gpu, |js)
Error Verification
Actual Compiler Output
error[KORU110]: event 'compute' is called but its ~proc declaration has no |variant tag — bare procs are unresolvable
--> tests/regression/300_ADVANCED_FEATURES/370_VARIANTS/8211_bare_proc_call_site_fails/input.kz:17:0
|
17 | ~compute()
| ^
hint: tag the proc with a host: `~proc compute|zig { ... }` (or another host like |gpu, |js)Test Configuration
MUST_FAIL