Skip to content
docs
Arxo ↗

LDC-E2104 — An argument of the wrong type

For LLMs5 sections

Each argument must fit the parameter it fills: an entity argument must be of the declared type or one of its subtypes, and a value must be of the declared kind. The language performs no silent conversions — a broader type never flows into a narrower parameter, and a value of one kind never stands in for another.

Pass a value of the expected type, or widen the parameter to accept what the rule actually supplies. Subtyping runs one way: a parameter typed with a base entity accepts its subtypes, never the reverse.

Arxo Law
language "law.core" version "0.2";
package demo.diagnostics version "0.1.0";
namespace "urn:law:demo:diagnostics";
entity Walker;
entity Runner : Walker;
relation walks(p: Runner) kind institutional;
relation strolls(a: Walker) kind institutional;
rule R strict { for a: Walker; when strolls(a); then walks(a); }
Arxo Law
language "law.core" version "0.2";
package demo.diagnostics version "0.1.0";
namespace "urn:law:demo:diagnostics";
entity Walker;
entity Runner : Walker;
relation walks(p: Runner) kind institutional;
relation strolls(a: Walker) kind institutional;
rule R strict { for r: Runner; when strolls(r); then walks(r); }

The engine reports this in its own wording:

Output
example.law:9:60: error LDC-E2104: walks: argument "a" has type Local("Walker"), parameter "p" expects Local("Runner") (§48: no implicit conversions)

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

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