LDC-E2104 — An argument of the wrong type
For LLMs5 sections
What it means
Section titled “What it means”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.
Example
Section titled “Example”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); }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); }Documentation for Arxo. Writings — blog.arxo.io.
Anonymous visit counts on stats.arxo.io, no cookies.