✓
Passing This code compiles and runs correctly.
Code
// STRICT 1:1 (Lars-ratified 2026-06-12): destructure fields ↔ named groups
// must match BOTH ways, compile-time error from the transform (it owns
// pattern AND destructure at the same site). Here group `w` is captured
// but never destructured — unwanted capture must be spelled `(...)`.
import std/io
import std/regex
std/regex:match("2x3")
| `(?<l>[0-9]+)x(?<w>[0-9]+)` { l: i64 } |> std/io:print.ln("{{ l:d }}")
| no-match |> std/io:print.ln("no")
Must contain:
has no destructure fieldError Verification
Actual Compiler Output
🎯 Compiler coordination: Passes: 14 (flow-based: frontend, analysis, emission)
Error: output_emitted.zig:10:16: error: regex match: named group 'w' has no destructure field — take delivery, or make it non-capturing: spell it (...)
comptime { @compileError("regex match: named group 'w' has no destructure field — take delivery, or make it non-capturing: spell it (...)"); }
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
referenced by:
main_module: output_emitted.zig:9:25
main: output_emitted.zig:438:5
4 reference(s) hidden; use '-freference-trace=6' to see all referencesTest Configuration
MUST_FAIL