LDC-E2107 — An unreachable branch after a wildcard
For LLMs5 sections
What it means
Section titled “What it means”A wildcard branch matches everything, so any branch written after it can never run. The compiler keeps the package working and warns at the dead branch instead of refusing it — the match still evaluates, but the shadowed branch is decoration.
This is a warning, not a refusal: the package still checks. Moving the wildcard to the end, or dropping the shadowed branch, clears it.
Example
Section titled “Example”language "law.core" version "0.2";package demo.diagnostics version "0.1.0";namespace "urn:law:demo:diagnostics";
enum Status { Active; Suspended; Revoked; }relation s(x: Status) kind institutional;relation f(a: Decimal) kind institutional;relation done(x: Status) kind institutional;rule R strict { for x: Status; when s(x) and f(match x { _ => 0; Active => 1; }); then done(x); }language "law.core" version "0.2";package demo.diagnostics version "0.1.0";namespace "urn:law:demo:diagnostics";
enum Status { Active; Suspended; Revoked; }relation s(x: Status) kind institutional;relation f(a: Decimal) kind institutional;relation done(x: Status) kind institutional;rule R strict { for x: Status; when s(x) and f(match x { Active => 1; _ => 0; }); then done(x); }Documentation for Arxo. Writings — blog.arxo.io.
Anonymous visit counts on stats.arxo.io, no cookies.