010 reject groups discarded

✓ Passing Passing: the compiler rejects this program as expected.

Code

input.k

Actual compiler output

error[KORU162]: regex match: pattern `(?<x>[0-9]+)` declares named groups but the branch discards the payload — destructure them, bind the payload, or make the unwanted capture non-capturing: spell it (...)
  --> tests/regression/600_STDLIB/640_REGEX/640_010_reject_groups_discarded/input.k:7:0

Must contain:

spell it (...)

Flows

flow ~match click a branch to expand · @labels scroll to their anchor
match (expr: "42")

Test Configuration

MUST_ERROR