✓
Passing This code compiles and runs correctly.
Code
// Multi-pattern scan (leftmost-across-patterns) is a PINNED follow-up: `match`
// already does multi-pattern via `|` dispatch, and scan reaching parity is
// future work. For now a second `!` pattern is rejected loudly so the
// limitation is visible, not silent. When multi-pattern lands, this test flips
// to MUST_RUN.
import std/io
import std/regex
std/regex:scan(input: "a12")
! `[a-z]+` w |> std/io:print.ln("w={{ w:s }}")
! `[0-9]+` n |> std/io:print.ln("n={{ n:s }}")
| done |> std/io:print.ln("done")
Must contain:
single pattern branch for nowError Verification
Actual Compiler Output
🎯 Compiler coordination: Passes: 14 (flow-based: frontend, analysis, emission)
Error: output_emitted.zig:10:16: error: std/regex:scan supports a single pattern branch for now; multi-pattern scan (leftmost-across-patterns) is pinned as a follow-up
comptime { @compileError("std/regex:scan supports a single pattern branch for now; multi-pattern scan (leftmost-across-patterns) is pinned as a follow-up"); }
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
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: "a12")
Test Configuration
MUST_FAIL