Skip to content
docs
Arxo ↗

LDC-E2107 — An unreachable branch after a wildcard

For LLMs5 sections

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.

Arxo Law
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); }
Arxo Law
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); }

The engine reports this in its own wording:

Output
example.law:9:66: warning LDC-E2107: unreachable branch "Active" after wildcard (§55.1)

Documentation for Arxo. Writings — blog.arxo.io.

Anonymous visit counts on stats.arxo.io, no cookies.