✓
Passing This code compiles and runs correctly.
Code
// Test 8211: Bare proc declarations are unresolvable when called.
// MUST_ERROR: 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");
~tor compute {}
// Bare proc - no |variant tag. Unresolvable.
~proc compute {
}
// Call site triggers KORU110.
~compute()
Frontend must reject with:
CONTAINS error[KORU110
CONTAINS bare procs are unresolvableExpected compiler error
error[KORU110]: tor '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)
Flows
flow ~compute click a branch to expand · @labels scroll to their anchor
compute