Markdown for LLMs
LDC-E1377 — Test extending a referenced case
The source Markdown for this article. Copy it into your assistant or download it as a text file.
# LDC-E1377 — Test extending a referenced case
## What it means
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.
## Example
```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"}
```
## Fix
```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}
```
## Engine message
The engine reports this in its own wording:
```text
$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)
```
## Related
- [LDC-E1363](/diagnostics/LDC-E1363/) — a snapshot in a file that takes none.
- [LDC-E1316](/diagnostics/LDC-E1316/) — a test that asserts nothing at all.