Skip to content
docs
Arxo ↗

LDC-E2111 — A constant whose value has the wrong kind

For LLMs5 sections

A constant promises a type and must deliver it: the declared type and the kind of the initializer are compared, and a mismatch is rejected at the declaration. An integer never initializes a date, and text never initializes a number — the promise is taken literally.

Changing the declared type to the one the value actually has, or rewriting the value in the declared type, clears it. The message names both sides, so the wrong one is easy to spot.

Arxo Law
language "law.core" version "0.2";
package demo.diagnostics version "0.1.0";
namespace "urn:law:demo:diagnostics";
const Founded: Date = 2026;
Arxo Law
language "law.core" version "0.2";
package demo.diagnostics version "0.1.0";
namespace "urn:law:demo:diagnostics";
const Founded: Date = @2026-01-01;

The engine reports this in its own wording:

Output
example.law:5:7: error LDC-E2111: constant Founded: declared type Date, initializer yields Integer (§54/§48)

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

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