Markdown for LLMs
LDC-E2140 — Named arguments that do not match the signature
The source Markdown for this article. Copy it into your assistant or download it as a text file.
# LDC-E2140 — Named arguments that do not match the signature
## What it means
A call may name its arguments, but the names come from the declared
signature of the relation — every parameter exactly once, no unknown
names, no repetitions, no mixing with positional arguments. The compiler
orders the given values by the signature, so anything the signature does
not contain leaves a parameter without a value. When the names do not line
up with the signature, the compiler refuses the call at the call site.
The fix is a rename at the call: spell every parameter name exactly as
declared, once each. Calls without a declared signature to order by —
function calls and comprehension-free aggregates — cannot take named
arguments at all.
## Example
```law
language "law.core" version "0.2";
package demo.diagnostics version "0.1.0";
namespace "urn:law:demo:diagnostics";
entity Person;
relation paid(person: Person, amount: Integer) kind empirical;
relation rich(p: Person) kind institutional;
rule R strict { for p: Person; when paid(person: p, bogus: 1); then rich(p); }
```
## Fix
```law
language "law.core" version "0.2";
package demo.diagnostics version "0.1.0";
namespace "urn:law:demo:diagnostics";
entity Person;
relation paid(person: Person, amount: Integer) kind empirical;
relation rich(p: Person) kind institutional;
rule R strict { for p: Person; when paid(person: p, amount: 1); then rich(p); }
```
## Engine message
The engine reports this in its own wording:
```text
example.law:8:37: error LDC-E2140: parameter "amount" must be given exactly once; check for unknown and repeated names
```
## Related
- [Vocabulary](/constructs/vocabulary/) — how names are declared and which positions take them.