✓
Passing This code compiles and runs correctly.
Code
// ============================================================================
// Test 510_103: MUST_ERROR — handler body is `_` discard but the branch
// declares a resume type. The handler fn must produce a value of the
// resume type; a discard produces nothing.
// ============================================================================
~pub tor prompt-user { question: string }
! ask string -> string
| done string
~proc prompt-user|zig {
const reply = ask(question);
return .{ .done = reply };
}
~prompt-user(question: "?")
! ask _ |> _
| done _ |> _
Must fail at backend compile:
Code generation must reject the program.
Flows
flow ~prompt-user click a branch to expand · @labels scroll to their anchor
prompt-user (question: "?")