✓
Passing This code compiles and runs correctly.
Code
// Cut-2 restriction (same doctrine as backrefs): no capture groups under
// quantifiers — a repeated group has no single span, and silently keeping
// the last iteration is the trap every regex engine apologizes for.
// Rejected loudly at the match site.
import std/io
import std/regex
std/regex:match("aaa")
| `(?<x>a)+` { x } |> std/io:print.ln("{{ x:s }}")
| no-match |> std/io:print.ln("no")
Must contain:
GroupUnderQuantifierError Verification
Actual Compiler Output
🎯 Compiler coordination: Passes: 17 (flow-based: frontend, analysis, emission)
Error: output_emitted.zig:30:16: error: regex: cannot compile pattern `(?<x>a)+`: GroupUnderQuantifier
comptime { @compileError("regex: cannot compile pattern `(?<x>a)+`: GroupUnderQuantifier"); }
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
referenced by:
main_module: output_emitted.zig:29:25
main: output_emitted.zig:473:5
4 reference(s) hidden; use '-freference-trace=6' to see all referencesFlows
flow ~match click a branch to expand · @labels scroll to their anchor
match (expr: "aaa")
Test Configuration
MUST_FAIL