309 bare return with named branches

✓ Passing Passing: the compiler rejects this program as expected.

Code

input.k

Actual compiler output

error[PARSE003]: tor 'probe' declares a bare return `-> u32` AND named `| failed` outcomes — a bare return has no tags, so every declared branch is unreachable at the call site. Pick one contract: `-> T` alone, or named `| branch` outcomes with no `->`
  --> tests/regression/200_COMPILER_FEATURES/210_PARSER/210_309_bare_return_with_named_branches/input.k:11:1
    |
 11 | tor probe { n: u32 } -> u32
    | ^

Frontend must reject with:

CONTAINS error[PARSE003]
CONTAINS a bare return has no tags
NOT_CONTAINS output_emitted.zig

Test Configuration

MUST_ERROR