Skip to content
docs
Arxo ↗

LDC-E1377 — Test extending a referenced case

For LLMs5 sections

A test can run against a case declared elsewhere — by reference, not by copy. But a reference is exact: the test takes the case as it is. Appending changed information to the reference does not extend the case; it describes a different case that happens to share a name. The compiler stops at the reference: changed information is another case, declared in its own file.

The repair is to write the input inline in the test’s given block, or to declare the changed situation as a separate case. A test borrows a case whole or not at all.

run
{"argv": ["lower-test", "$ROOT/test.lawtest"], "files": {"test.lawtest": "language \"law.core\" version \"0.2\";\npackage demo.diagnostics version \"0.1.0\";\nnamespace \"urn:law:demo:diagnostics\";\n\nrelation sunny() kind institutional;\n\ntest \"borrows\" {\n given case Solo {\n context {\n legal_time @2026-08-26;\n }\n }\n\n evaluate truth(sunny());\n\n expect evaluation_status == COMPUTED;\n}\n"}, "expect": "LDC-E1377"}
run
{"argv": ["lower-test", "$ROOT/test.lawtest"], "files": {"test.lawtest": "language \"law.core\" version \"0.2\";\npackage demo.diagnostics version \"0.1.0\";\nnamespace \"urn:law:demo:diagnostics\";\n\nrelation sunny() kind institutional;\n\ntest \"borrows\" {\n given {\n context {\n legal_time @2026-08-26;\n }\n }\n\n evaluate truth(sunny());\n\n expect evaluation_status == COMPUTED;\n}\n"}, "expect": null}

The engine reports this in its own wording:

Output
$ROOT/test.lawtest:8:5: error LDC-E1377: case Solo is not extended by reference: changed information is another case, declare it in .lawcase (§267.1, DECISION-0387)

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

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