docs← Back to article

Markdown for LLMs

LDC-E5405 — Reference left dangling by the amendment

The source Markdown for this article. Copy it into your assistant or download it as a text file.

Download this articlePlain text ↗
# LDC-E5405 — Reference left dangling by the amendment

## What it means

A reference points at a fragment by its locator, and it keeps pointing
there after every amendment the package declares. When a revision edge
removes or renumbers the fragment a reference aims at, the reference would
silently aim at nothing. The compiler reports the dangling reference at the
edge that broke it — retarget the reference or keep the fragment alive
through the amendment.

## Example

```law
language "law.core" version "0.2";
package demo.diagnostics version "0.1.0";
namespace "urn:law:demo:diagnostics";

source ORDER { kind ministerial_order; }
edition ED_2025 of ORDER { language ru; officiality official; }
edition ED_2026 of ORDER { language ru; officiality official; }
fragment F_OLD in ED_2025 { kind article; locator "article/5";
  text ru official """старая редакция"""; }
revision LAW_1 {
  previous ED_2025;
  next ED_2026;
  relation amends;
  op repeal { locator "article/5"; }
}
reference R { source ORDER; locator "article/5"; resolve_at legal_time; }
```

## Fix

```law
language "law.core" version "0.2";
package demo.diagnostics version "0.1.0";
namespace "urn:law:demo:diagnostics";

source ORDER { kind ministerial_order; }
edition ED_2025 of ORDER { language ru; officiality official; }
edition ED_2026 of ORDER { language ru; officiality official; }
fragment F_OLD in ED_2025 { kind article; locator "article/5";
  text ru official """старая редакция"""; }
fragment F_NEW in ED_2026 { kind article; locator "article/5";
  text ru official """новая редакция"""; }
revision LAW_1 {
  previous ED_2025;
  next ED_2026;
  relation amends;
  op replace { locator "article/5"; language ru; text """новая редакция"""; }
}
reference R { source ORDER; locator "article/5"; resolve_at legal_time; }
```

## Engine message

The engine reports this in its own wording:

```text
example.law:16:11: error LDC-E5405: reference "R" points at article/5, which does not exist after amendment "LAW_1" (§32.1)
```

## Related

- [Sources](/constructs/sources/) — how editions carry fragment texts.
- [Time](/constructs/time/) — how editions and effective moments order amendments.