# LDC-E0204 — A let without a written type ## What it means A `let` inside a rule body names an intermediate value, and the language asks for its type up front: `let` followed by the name, a colon, the type, and the value. Without the annotation the reader cannot tell which computation the name stands for, so the binding is refused where the value starts. The fix is the annotation, not a different value: write the binding as its own body line with the colon and the type the value already has. Everything downstream of the binding stays untouched. ## Example ```law language "law.core" version "0.2"; package demo.diagnostics version "0.1.0"; namespace "urn:law:demo:diagnostics"; entity A; relation p(a: A) kind institutional; relation q(a: A) kind institutional; rule R defeasible { for x: A; when p(x) and (let v = 1 in v) = 1; then q(x); } ``` ## Fix ```law language "law.core" version "0.2"; package demo.diagnostics version "0.1.0"; namespace "urn:law:demo:diagnostics"; entity A; relation p(a: A) kind institutional; relation q(n: Integer) kind institutional; relation r(n: Integer) kind institutional; rule R strict { for a: A; for n: Integer; when p(a) and q(n); let m: Integer = n + 1; then r(m); } ``` ## Engine message The engine reports this in its own wording: ```text example.law:10:24: error LDC-E0204: let v: a type annotation is mandatory in v1 -- `let x: T = ...` (§55) ``` ## Related - [LDC-E0201](/diagnostics/LDC-E0201/) — the sentence stops where the language does not expect it.