✓
Passing This code compiles and runs correctly.
Code
// scan dispatches INTO each match — effect semantics. A terminal `|` pattern
// (fire-once) is the wrong kind and is rejected loudly, mirroring the orisha
// router's rejection of terminal route branches. Use `!`.
import std/io
import std/regex
std/regex:scan(input: "42")
| `[0-9]+` n |> std/io:print.ln("oops")
| done |> std/io:print.ln("done")
Must contain:
must be an effect branch `!`Error Verification
Actual Compiler Output
🎯 Compiler coordination: Passes: 14 (flow-based: frontend, analysis, emission)
Error: output_emitted.zig:10:16: error: std/regex:scan pattern `[0-9]+` must be an effect branch `!` (it fires once per match), not a terminal `|`
comptime { @compileError("std/regex:scan pattern `[0-9]+` must be an effect branch `!` (it fires once per match), not a terminal `|`"); }
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
referenced by:
main_module: output_emitted.zig:9:25
main: output_emitted.zig:439:5
4 reference(s) hidden; use '-freference-trace=6' to see all referencesFlows
flow ~scan click a branch to expand · @labels scroll to their anchor
scan (input: "42")
Test Configuration
MUST_FAIL