LDC-E2141 — A variants cell of the wrong type
What it means
Section titled “What it means”A row of variants declares the type of each cell up front, and every cell must hold a value of that type: money in the stated currency for a money cell, a non-negative value for a natural cell, and so on. A cell that breaks the declared type would feed the scenario a value the norm never quantifies over. The compiler checks each cell against its declared type and refuses the row at the offending value.
The fix is inside the cell: write the value in the declared type and currency. Scenario rows always carry a separate notice that they are not part of the program itself; the type refusal clears as soon as the value matches, and the corrected value below is shown as a plain assertion.
Example
Section titled “Example”language "law.core" version "0.2";package demo.diagnostics version "0.1.0";namespace "urn:law:demo:diagnostics";
entity KZT;test "row" variants (m: Money<KZT>) {"r" (100);} {given {}}language "law.core" version "0.2";package demo.diagnostics version "0.1.0";namespace "urn:law:demo:diagnostics";
entity KZT;relation due(m: Money<KZT>) kind empirical;assert due(100 KZT);Documentation for Arxo. Writings — blog.arxo.io.
Anonymous visit counts on stats.arxo.io, no cookies.